From 0141210db7965546ab6280617d6c012f4ae05985 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 29 Apr 2022 10:38:44 +0100 Subject: [PATCH 01/42] Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting --- cabal.project | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index 4cc16fa34a..507998d23c 100644 --- a/cabal.project +++ b/cabal.project @@ -37,8 +37,8 @@ optional-packages: vendored/*/*.cabal tests: true package * - -- ghc 8.10 cannot build ghc-lib 9.2 with --haddock - -- ghc-options: -haddock + -- ghc 8.10.7 fails to build ghc-lib-9.2.2 + -- ghc-options: --haddock test-show-details: direct write-ghc-environment-files: never From ca400dfa350b36150a1d37525897485daedb571b Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 25 Apr 2022 06:34:49 -0400 Subject: [PATCH 02/42] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) --- flake.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index b1d15496c1..3fe8d593c3 100644 --- a/flake.lock +++ b/flake.lock @@ -15,11 +15,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", "type": "github" }, "original": { @@ -30,11 +30,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1629481132, - "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "lastModified": 1649676176, + "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", "owner": "numtide", "repo": "flake-utils", - "rev": "997f7efcb746a9c140ce1f13c72263189225f482", + "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", "type": "github" }, "original": { @@ -45,11 +45,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "owner": "numtide", "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "type": "github" }, "original": { @@ -85,11 +85,11 @@ "gitignore": { "flake": false, "locked": { - "lastModified": 1611672876, - "narHash": "sha256-qHu3uZ/o9jBHiA3MEKHJ06k7w4heOhA+4HCSIvflRxo=", + "lastModified": 1646480205, + "narHash": "sha256-kekOlTlu45vuK2L9nq8iVN17V3sB0WWPqTTW3a2SQG0=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "211907489e9f198594c0eb0ca9256a1949c9d412", + "rev": "bff2832ec341cf30acb3a4d3e2e7f1f7b590116a", "type": "github" }, "original": { @@ -101,13 +101,13 @@ "hie-bios": { "flake": false, "locked": { - "narHash": "sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=", + "narHash": "sha256-5RqspT27rb/tMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=", "type": "tarball", - "url": "https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz" + "url": "https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz" }, "original": { "type": "tarball", - "url": "https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz" + "url": "https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz" } }, "hlint": { @@ -172,11 +172,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1639357775, - "narHash": "sha256-mJJFCPqZi1ZO3CvgEfN2nFAYv4uAJSRnTKzLFi61+WA=", + "lastModified": 1650792148, + "narHash": "sha256-n1MZSZIzvP70BJ56tV8GwQ5L0wHt/nTH9UkF5HTGB/4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c473cc8714710179df205b153f4e9fa007107ff9", + "rev": "ab83c5d70528f1edc7080dead3a5dee61797b3ff", "type": "github" }, "original": { @@ -188,11 +188,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1641016545, - "narHash": "sha256-JMNwvnBzG0RjGG3eH27Y5/GlJ9ryeCdGJfqGbqxnmZY=", - "owner": "NixOS", + "lastModified": 1645655918, + "narHash": "sha256-ZfbEFRW7o237+A1P7eTKhXje435FCAoe0blj2n20Was=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "6f05cfdb1e78d36c0337516df674560e4b51c79b", + "rev": "77a7a4197740213879b9a1d2e1788c6c8ade4274", "type": "github" }, "original": { @@ -206,11 +206,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1624971177, - "narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=", + "lastModified": 1649054408, + "narHash": "sha256-wz8AH7orqUE4Xog29WMTqOYBs0DMj2wFM8ulrTRVgz0=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb", + "rev": "e5e7b3b542e7f4f96967966a943d7e1c07558042", "type": "github" }, "original": { From 42f230478f2785be5e72cc4ab85a8236965e0897 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 25 Apr 2022 06:37:56 -0400 Subject: [PATCH 03/42] nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 --- flake.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index d7975491b8..c8ef6cb694 100644 --- a/flake.nix +++ b/flake.nix @@ -114,8 +114,6 @@ github = overrideCabal hsuper.github (drv: { patches = []; }); # GHCIDE requires hie-bios ^>=0.9.1 hie-bios = hself.callCabal2nix "hie-bios" inputs.hie-bios {}; - # We need an older version - hiedb = hself.hiedb_0_4_1_0; lsp = hsuper.callCabal2nix "lsp" inputs.lsp {}; lsp-types = hsuper.callCabal2nix "lsp-types" inputs.lsp-types {}; @@ -207,7 +205,7 @@ }; ghc901Config = (import ./configuration-ghc-901.nix) { inherit pkgs; }; - ghc921Config = (import ./configuration-ghc-921.nix) { inherit pkgs inputs; }; + ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; }; # GHC versions ghcDefault = pkgs.hlsHpkgs ("ghc" @@ -216,7 +214,7 @@ ghc884 = pkgs.hlsHpkgs "ghc884"; ghc8107 = pkgs.hlsHpkgs "ghc8107"; ghc901 = ghc901Config.tweakHpkgs (pkgs.hlsHpkgs "ghc901"); - ghc921 = ghc921Config.tweakHpkgs (pkgs.hlsHpkgs "ghc921"); + ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); # For markdown support myst-parser = pkgs.python3Packages.callPackage ./myst-parser.nix {}; @@ -337,7 +335,7 @@ haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; haskell-language-server-901-dev = mkDevShell ghc901 "cabal.project"; - haskell-language-server-921-dev = mkDevShell ghc921 "cabal.project"; + haskell-language-server-922-dev = mkDevShell ghc921 "cabal.project"; }; # Developement shell, haskell packages are also provided by nix @@ -346,7 +344,7 @@ haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; haskell-language-server-901-dev-nix = mkDevShellWithNixDeps ghc901 "cabal.project"; - haskell-language-server-921-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; + haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; }; allPackages = { @@ -354,7 +352,7 @@ haskell-language-server-884 = mkExe ghc884; haskell-language-server-8107 = mkExe ghc8107; haskell-language-server-901 = mkExe ghc901; - haskell-language-server-921 = mkExe ghc921; + haskell-language-server-922 = mkExe ghc922; }; devShells = simpleDevShells // nixDevShells; From bb89cc6b2b9c8916d98d0a10b4be5f3fc52921e8 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 25 Apr 2022 19:41:41 -0400 Subject: [PATCH 04/42] myst-parser: bump docutils version requirements --- docs/requirements.txt | 2 +- docutils.nix | 32 +++++++++++++++ flake.lock | 91 ++++++++++++++++++++++++++++++++++++++++++- flake.nix | 41 +++++++++++++------ 4 files changed, 151 insertions(+), 15 deletions(-) create mode 100644 docutils.nix diff --git a/docs/requirements.txt b/docs/requirements.txt index 66d33da6c1..b46859cb93 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ Sphinx==4.0.2 sphinx-rtd-theme==0.5.2 myst-parser==0.15.1 -docutils<0.17 +docutils<0.19 diff --git a/docutils.nix b/docutils.nix new file mode 100644 index 0000000000..1c47e1455d --- /dev/null +++ b/docutils.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, fetchPypi, buildPythonPackage, isPy3k, python }: + +buildPythonPackage rec { + pname = "docutils"; + version = "0.17.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"; + }; + + # Only Darwin needs LANG, but we could set it in general. + # It's done here conditionally to prevent mass-rebuilds. + checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) + ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + '' + ${python.interpreter} test/alltests.py + ''; + + # Create symlinks lacking a ".py" suffix, many programs depend on these names + postFixup = '' + for f in $out/bin/*.py; do + ln -s $(basename $f) $out/bin/$(basename $f .py) + done + ''; + + meta = with lib; { + description = "Python Documentation Utilities"; + homepage = "http://docutils.sourceforge.net/"; + license = with licenses; [ publicDomain bsd2 psfl gpl3Plus ]; + maintainers = with maintainers; [ AndersonTorres ]; + }; +} diff --git a/flake.lock b/flake.lock index 3fe8d593c3..c9fc8b8e9b 100644 --- a/flake.lock +++ b/flake.lock @@ -44,6 +44,21 @@ } }, "flake-utils_2": { + "locked": { + "lastModified": 1649676176, + "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -170,6 +185,23 @@ "url": "https://hackage.haskell.org/package/lsp-types-1.4.0.1/lsp-types-1.4.0.1.tar.gz" } }, + "myst-parser": { + "flake": false, + "locked": { + "lastModified": 1650933355, + "narHash": "sha256-Osd3urvH1bn9w/6sAMyLKHO7gxuYePpGJ9y8ReBfp4E=", + "owner": "smunix", + "repo": "MyST-Parser", + "rev": "57d0d78169a0e157406c35df951bdffdf94b4f9b", + "type": "github" + }, + "original": { + "owner": "smunix", + "ref": "fix.hls-docutils", + "repo": "MyST-Parser", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1650792148, @@ -187,6 +219,21 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1650933476, + "narHash": "sha256-kBefFyATME/AGGFMudAltOeKYnSc3YDOI0YgDjjIhzw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7deb7b084d6959f4076bcf0ff4aa0a120f1d31ca", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1645655918, "narHash": "sha256-ZfbEFRW7o237+A1P7eTKhXje435FCAoe0blj2n20Was=", @@ -200,11 +247,31 @@ "type": "indirect" } }, - "pre-commit-hooks": { + "poetry2nix": { "inputs": { "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" }, + "locked": { + "lastModified": 1650693998, + "narHash": "sha256-rypGV9HND1VsR/DEtD4O3cPcwCJVfIiTKvEbYskQSqg=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "8cfd980262181bd3ef15899708ceeb2e3f33958b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "poetry2nix", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_3" + }, "locked": { "lastModified": 1649054408, "narHash": "sha256-wz8AH7orqUE4Xog29WMTqOYBs0DMj2wFM8ulrTRVgz0=", @@ -245,9 +312,29 @@ "lsp": "lsp", "lsp-test": "lsp-test", "lsp-types": "lsp-types", + "myst-parser": "myst-parser", "nixpkgs": "nixpkgs", + "poetry2nix": "poetry2nix", "pre-commit-hooks": "pre-commit-hooks", - "retrie": "retrie" + "retrie": "retrie", + "sphinx_rtd_theme": "sphinx_rtd_theme" + } + }, + "sphinx_rtd_theme": { + "flake": false, + "locked": { + "lastModified": 1628276861, + "narHash": "sha256-fzqi0QfDSiN8YXtAiWXIoOlyHZQI4V32uOKZjPfWeWY=", + "owner": "readthedocs", + "repo": "sphinx_rtd_theme", + "rev": "34f81daaf52466366c80003db293d50075c1b896", + "type": "github" + }, + "original": { + "owner": "readthedocs", + "repo": "sphinx_rtd_theme", + "rev": "34f81daaf52466366c80003db293d50075c1b896", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index c8ef6cb694..4fa8b5a0c6 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,16 @@ url="/https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz"; flake = false; }; + myst-parser = { + url = "github:smunix/MyST-Parser?ref=fix.hls-docutils"; + flake = false; + }; + # For https://github.com/readthedocs/sphinx_rtd_theme/pull/1185, otherwise lists are broken locally + sphinx_rtd_theme = { + url = "github:readthedocs/sphinx_rtd_theme?rev=34f81daaf52466366c80003db293d50075c1b896"; + flake = false; + }; + poetry2nix.url = "github:nix-community/poetry2nix/master"; }; outputs = inputs@{ self, nixpkgs, flake-compat, flake-utils, pre-commit-hooks, gitignore, ... }: @@ -169,7 +179,7 @@ let pkgs = import nixpkgs { inherit system; - overlays = [ self.overlay ]; + overlays = [ self.overlay inputs.poetry2nix.overlay ]; config = { allowBroken = true; }; }; @@ -217,16 +227,23 @@ ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); # For markdown support - myst-parser = pkgs.python3Packages.callPackage ./myst-parser.nix {}; - sphinx_rtd_theme = pkgs.python3Packages.sphinx_rtd_theme.overrideAttrs (oldAttrs: { - # For https://github.com/readthedocs/sphinx_rtd_theme/pull/1185, otherwise lists are broken locally - src = pkgs.fetchFromGitHub { - owner = "readthedocs"; - repo = "sphinx_rtd_theme"; - rev = "34f81daaf52466366c80003db293d50075c1b896"; - sha256 = "0rkrsvvqr6g2p3v5vq88jhfp5sd0r1jqjh3vc5y26jn30z8s4fkz"; - }; - }); + myst-parser = pkgs.poetry2nix.mkPoetryEnv { + projectDir = inputs.myst-parser; + python = pkgs.python39; + overrides = [ + pkgs.poetry2nix.defaultPoetryOverrides + ]; + }; + sphinx_rtd_theme = pkgs.poetry2nix.mkPoetryEnv { + projectDir = inputs.sphinx_rtd_theme; + python = pkgs.python39; + overrides = [ + pkgs.poetry2nix.defaultPoetryOverrides + (self: super: { + docutils = pkgs.python3Packages.callPackage ./docutils.nix {}; + }) + ]; + }; pythonWithPackages = pkgs.python3.withPackages (ps: [ps.sphinx myst-parser sphinx_rtd_theme ps.pip]); docs = pkgs.stdenv.mkDerivation { @@ -377,7 +394,7 @@ defaultPackage = packages.haskell-language-server; - devShell = devShells.haskell-language-server-dev; + devShell = devShells.haskell-language-server-922-dev; }); nixConfig = { From 8bef4927726a295a9a00081260d0de88764c2f11 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Tue, 26 Apr 2022 07:25:52 -0400 Subject: [PATCH 05/42] fix devShells and packages default --- .gitignore | 2 +- ...config.yaml => .pre-commit-config.yaml.bak | 0 flake.nix | 28 +++++++++++-------- 3 files changed, 17 insertions(+), 13 deletions(-) rename .pre-commit-config.yaml => .pre-commit-config.yaml.bak (100%) diff --git a/.gitignore b/.gitignore index 8b90d20187..61cfe5877b 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ test/testdata/**/hie.yaml .shake/ # pre-commit-hook.nix -#.pre-commit-config.yaml +.pre-commit-config.yaml # direnv /.direnv/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml.bak similarity index 100% rename from .pre-commit-config.yaml rename to .pre-commit-config.yaml.bak diff --git a/flake.nix b/flake.nix index 4fa8b5a0c6..0d3f0507a2 100644 --- a/flake.nix +++ b/flake.nix @@ -77,7 +77,7 @@ outputs = inputs@{ self, nixpkgs, flake-compat, flake-utils, pre-commit-hooks, gitignore, ... }: { - overlay = final: prev: + overlays.default = final: prev: with prev; let haskellOverrides = hself: hsuper: { @@ -179,7 +179,7 @@ let pkgs = import nixpkgs { inherit system; - overlays = [ self.overlay inputs.poetry2nix.overlay ]; + overlays = [ self.overlays.default inputs.poetry2nix.overlay ]; config = { allowBroken = true; }; }; @@ -214,7 +214,7 @@ }; }; - ghc901Config = (import ./configuration-ghc-901.nix) { inherit pkgs; }; + ghc902Config = (import ./configuration-ghc-902.nix) { inherit pkgs; }; ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; }; # GHC versions @@ -223,7 +223,7 @@ pkgs.haskellPackages.ghc.version); ghc884 = pkgs.hlsHpkgs "ghc884"; ghc8107 = pkgs.hlsHpkgs "ghc8107"; - ghc901 = ghc901Config.tweakHpkgs (pkgs.hlsHpkgs "ghc901"); + ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); # For markdown support @@ -295,7 +295,7 @@ export PATH=$PATH:$HOME/.local/bin # Enable the shell hooks - ${(pre-commit-check ghcDefault).shellHook} + ${self.checks.${system}.pre-commit-check.shellHook} # If the cabal project file is not the default one. # Print a warning and generate an alias. @@ -351,8 +351,8 @@ haskell-language-server-dev = mkDevShell ghcDefault "cabal.project"; haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; - haskell-language-server-901-dev = mkDevShell ghc901 "cabal.project"; - haskell-language-server-922-dev = mkDevShell ghc921 "cabal.project"; + haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; + haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project"; }; # Developement shell, haskell packages are also provided by nix @@ -360,7 +360,7 @@ haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; - haskell-language-server-901-dev-nix = mkDevShellWithNixDeps ghc901 "cabal.project"; + haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; }; @@ -368,13 +368,18 @@ haskell-language-server = mkExe ghcDefault; haskell-language-server-884 = mkExe ghc884; haskell-language-server-8107 = mkExe ghc8107; - haskell-language-server-901 = mkExe ghc901; + haskell-language-server-902 = mkExe ghc902; haskell-language-server-922 = mkExe ghc922; }; - devShells = simpleDevShells // nixDevShells; + devShells = simpleDevShells // nixDevShells // { + default = simpleDevShells.haskell-language-server-dev; + inherit (self.checks.${system}.pre-commit-check) shellHook; + }; packages = allPackages // { + default = allPackages.haskell-language-server; + # See https://github.com/NixOS/nix/issues/5591 # nix flake cannot build a list/set of derivation in one command. # Using a linkFarmFromDrvs, I'm creating a unique entry point to @@ -392,9 +397,8 @@ docs = docs; }; - defaultPackage = packages.haskell-language-server; + checks = { pre-commit-check = pre-commit-check ghcDefault; }; - devShell = devShells.haskell-language-server-922-dev; }); nixConfig = { From a58f97d6a0ccbffa6b6c9caf72bf1884caea22b0 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 08:10:56 -0400 Subject: [PATCH 06/42] use ghc-exactprint 1.5.0 for ghc922 --- flake.lock | 13 +++++++++++++ flake.nix | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/flake.lock b/flake.lock index c9fc8b8e9b..95015ed107 100644 --- a/flake.lock +++ b/flake.lock @@ -97,6 +97,18 @@ "url": "https://hackage.haskell.org/package/ghc-exactprint-1.4.1/ghc-exactprint-1.4.1.tar.gz" } }, + "ghc-exactprint-150": { + "flake": false, + "locked": { + "narHash": "sha256-f+WmS86c7B0dx2SMABIMm66z6sbRVWdqSZ1QBBEpUMw=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/ghc-exactprint-1.5.0/ghc-exactprint-1.5.0.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/ghc-exactprint-1.5.0/ghc-exactprint-1.5.0.tar.gz" + } + }, "gitignore": { "flake": false, "locked": { @@ -305,6 +317,7 @@ "flake-utils": "flake-utils", "fourmolu": "fourmolu", "ghc-exactprint": "ghc-exactprint", + "ghc-exactprint-150": "ghc-exactprint-150", "gitignore": "gitignore", "hie-bios": "hie-bios", "hlint": "hlint", diff --git a/flake.nix b/flake.nix index 0d3f0507a2..29c720a8e2 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,10 @@ url="/https://hackage.haskell.org/package/lsp-test-0.14.0.2/lsp-test-0.14.0.2.tar.gz"; flake = false; }; + ghc-exactprint-150 = { + url="/https://hackage.haskell.org/package/ghc-exactprint-1.5.0/ghc-exactprint-1.5.0.tar.gz"; + flake = false; + }; ghc-exactprint = { url="/https://hackage.haskell.org/package/ghc-exactprint-1.4.1/ghc-exactprint-1.4.1.tar.gz"; flake = false; @@ -399,6 +403,8 @@ checks = { pre-commit-check = pre-commit-check ghcDefault; }; + devShell = devShells.default; + defaultPackage = packages.default; }); nixConfig = { From 35f29894c00ad087fabcd6c3300785e7633b579e Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 09:15:35 -0400 Subject: [PATCH 07/42] ghc902: add flag hlint34 to nix --- flake.lock | 13 +++++++++++++ flake.nix | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 95015ed107..f7ce18e74c 100644 --- a/flake.lock +++ b/flake.lock @@ -149,6 +149,18 @@ "url": "https://hackage.haskell.org/package/hlint-3.3.6/hlint-3.3.6.tar.gz" } }, + "hlint-34": { + "flake": false, + "locked": { + "narHash": "sha256-mDncRtVkjWnUbZc1fgDMGcGjy8CFNxUF8z2HGuuN7GU=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/hlint-3.4/hlint-3.4.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/hlint-3.4/hlint-3.4.tar.gz" + } + }, "implicit-hie-cradle": { "flake": false, "locked": { @@ -321,6 +333,7 @@ "gitignore": "gitignore", "hie-bios": "hie-bios", "hlint": "hlint", + "hlint-34": "hlint-34", "implicit-hie-cradle": "implicit-hie-cradle", "lsp": "lsp", "lsp-test": "lsp-test", diff --git a/flake.nix b/flake.nix index 29c720a8e2..505d3672e0 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,10 @@ url="/https://hackage.haskell.org/package/hlint-3.3.6/hlint-3.3.6.tar.gz"; flake = false; }; + hlint-34 = { + url="/https://hackage.haskell.org/package/hlint-3.4/hlint-3.4.tar.gz"; + flake = false; + }; implicit-hie-cradle = { url="/https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz"; flake = false; @@ -218,7 +222,7 @@ }; }; - ghc902Config = (import ./configuration-ghc-902.nix) { inherit pkgs; }; + ghc902Config = (import ./configuration-ghc-902.nix) { inherit pkgs inputs; }; ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; }; # GHC versions From 5ba3cc4026bbb043f290416330cd57293e29c209 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 09:39:31 -0400 Subject: [PATCH 08/42] macosx: add SSE-enabled ptr-poker dependency --- flake.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flake.nix b/flake.nix index 505d3672e0..094ddd8942 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,10 @@ url="/https://hackage.haskell.org/package/hlint-3.4/hlint-3.4.tar.gz"; flake = false; }; + ptr-poker = { + url="/https://hackage.haskell.org/package/ptr-poker-0.1.2.8/ptr-poker-0.1.2.8.tar.gz"; + flake = false; + }; implicit-hie-cradle = { url="/https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz"; flake = false; From abaadd71cc426713d7aa116217144a0d20406a9c Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 09:46:36 -0400 Subject: [PATCH 09/42] ghc902 requires ghc-lib-parser >= 9.2 --- flake.lock | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flake.lock b/flake.lock index f7ce18e74c..37d5bc330c 100644 --- a/flake.lock +++ b/flake.lock @@ -310,6 +310,18 @@ "type": "github" } }, + "ptr-poker": { + "flake": false, + "locked": { + "narHash": "sha256-ll3wuUjkhTE8Grcs8LfGpdiuyobrSBmwgjqPOTlrPac=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/ptr-poker-0.1.2.8/ptr-poker-0.1.2.8.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/ptr-poker-0.1.2.8/ptr-poker-0.1.2.8.tar.gz" + } + }, "retrie": { "flake": false, "locked": { @@ -342,6 +354,7 @@ "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix", "pre-commit-hooks": "pre-commit-hooks", + "ptr-poker": "ptr-poker", "retrie": "retrie", "sphinx_rtd_theme": "sphinx_rtd_theme" } From a93d548c747ee648e3bd156838e0a8dee59dd0cd Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 10:38:16 -0400 Subject: [PATCH 10/42] nix: ghcDefault supports HLS tweaks --- flake.nix | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 094ddd8942..94b918744b 100644 --- a/flake.nix +++ b/flake.nix @@ -230,13 +230,22 @@ ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; }; # GHC versions - ghcDefault = pkgs.hlsHpkgs ("ghc" - + pkgs.lib.replaceStrings [ "." ] [ "" ] - pkgs.haskellPackages.ghc.version); - ghc884 = pkgs.hlsHpkgs "ghc884"; - ghc8107 = pkgs.hlsHpkgs "ghc8107"; - ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); - ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); + supportedGHCs = let + ghcVersion = ("ghc" + pkgs.lib.replaceStrings ["."] ["" pkgs.hskellPackages.ghc.version]); + cases = { + ghc884 = pkgs.hlsHpkgs "ghc884"; + ghc8107 = pkgs.hlsHpkgs "ghc8107"; + ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); + ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); + }; + lookUp = key: if cases ? key then cases."${key}" else (pkgs.hlsHpkgs ghcVersion); + in { default = lookUp ghcVersion; } // cases; + + ghc884 = supportedGHCs.ghc884; + ghc8107 = supportedGHCs.ghc8107; + ghc902 = supportedGHCs.ghc902; + ghc922 = supportedGHCs.ghc922; + ghcDefault = supportedGHCs.default; # For markdown support myst-parser = pkgs.poetry2nix.mkPoetryEnv { From 90f65cb76f6d7d129b47f692ffc7d2e604a95e6b Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:38:56 -0400 Subject: [PATCH 11/42] fix typo --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 94b918744b..df380db535 100644 --- a/flake.nix +++ b/flake.nix @@ -231,7 +231,7 @@ # GHC versions supportedGHCs = let - ghcVersion = ("ghc" + pkgs.lib.replaceStrings ["."] ["" pkgs.hskellPackages.ghc.version]); + ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.hskellPackages.ghc.version); cases = { ghc884 = pkgs.hlsHpkgs "ghc884"; ghc8107 = pkgs.hlsHpkgs "ghc8107"; From 9b8f200a1a446dd15cd7a19865a2c469283ebd38 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:45:14 -0400 Subject: [PATCH 12/42] add support for pre-commit in mkDevShell --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index df380db535..c4dfaeee2a 100644 --- a/flake.nix +++ b/flake.nix @@ -306,6 +306,7 @@ capstone tracy # ormolu # stylish-haskell + pre-commit ]; From ac3ed9b399d5e5ec0a70e1dbda5f0648f9eee5ab Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:53:37 -0400 Subject: [PATCH 13/42] fix typo --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c4dfaeee2a..5d83c10265 100644 --- a/flake.nix +++ b/flake.nix @@ -231,7 +231,7 @@ # GHC versions supportedGHCs = let - ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.hskellPackages.ghc.version); + ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version); cases = { ghc884 = pkgs.hlsHpkgs "ghc884"; ghc8107 = pkgs.hlsHpkgs "ghc8107"; From 1674c885df90e805f9a7177f6342e8c75d8c2e74 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 12:10:16 -0400 Subject: [PATCH 14/42] add ptr-poker to nix shell --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 5d83c10265..e603f5355c 100644 --- a/flake.nix +++ b/flake.nix @@ -291,6 +291,7 @@ buildInputs = [ # our compiling toolchain hpkgs.ghc + hpkgs.ptr-poker pkgs.cabal-install # @guibou: I'm not sure hie-bios is needed ghcDefault.hie-bios From fe77cc63298872a121f1600fdd33aa8fcc10000d Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 12:28:13 -0400 Subject: [PATCH 15/42] add ghc-884 configuration tweaks --- configuration-ghc-88.nix | 38 ++++++++++++++++++++++++++++++++++++++ flake.nix | 3 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 configuration-ghc-88.nix diff --git a/configuration-ghc-88.nix b/configuration-ghc-88.nix new file mode 100644 index 0000000000..652af4706f --- /dev/null +++ b/configuration-ghc-88.nix @@ -0,0 +1,38 @@ +# nix version of cabal-ghc901.project +{ pkgs, inputs }: + +let + disabledPlugins = [ + "hls-brittany-plugin" + "hls-hlint-plugin" + "hls-haddock-comments-plugin" + "hls-tactics-plugin" + # That one is not technically a plugin, but by putting it in this list, we + # get it removed from the top level list of requirement and it is not pull + # in the nix shell. + "shake-bench" + ]; + + hpkgsOverride = hself: hsuper: + with pkgs.haskell.lib; { + hlsDisabledPlugins = disabledPlugins; + + ghc-lib = hself.ghc-lib_8_10_7_20220219; + ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219; + + # Re-generate HLS drv excluding some plugins + haskell-language-server = + hself.callCabal2nixWithOptions "haskell-language-server" ./. + (pkgs.lib.concatStringsSep " " [ ]) { }; + + # YOLO + mkDerivation = args: + hsuper.mkDerivation (args // { + jailbreak = true; + doCheck = false; + }); + }; +in { + inherit disabledPlugins; + tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; +} diff --git a/flake.nix b/flake.nix index e603f5355c..2877a638d4 100644 --- a/flake.nix +++ b/flake.nix @@ -226,6 +226,7 @@ }; }; + ghc88Config = (import ./configuration-ghc-88.nix) { inherit pkgs inputs; }; ghc902Config = (import ./configuration-ghc-902.nix) { inherit pkgs inputs; }; ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; }; @@ -233,7 +234,7 @@ supportedGHCs = let ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version); cases = { - ghc884 = pkgs.hlsHpkgs "ghc884"; + ghc884 = ghc88Config.tweakHpkgs (pkgs.hlsHpkgs "ghc884"); ghc8107 = pkgs.hlsHpkgs "ghc8107"; ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); From 2e2bdc8a3adcff42012fae1d967bff6d74c39bc7 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 12:50:23 -0400 Subject: [PATCH 16/42] fix stylish-haskell for ghc-884 --- configuration-ghc-88.nix | 9 +++++++++ flake.lock | 15 ++++++++++++++- flake.nix | 4 ++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/configuration-ghc-88.nix b/configuration-ghc-88.nix index 652af4706f..eece4d17ba 100644 --- a/configuration-ghc-88.nix +++ b/configuration-ghc-88.nix @@ -5,6 +5,7 @@ let disabledPlugins = [ "hls-brittany-plugin" "hls-hlint-plugin" + "hls-stylish-haskell-plugin" "hls-haddock-comments-plugin" "hls-tactics-plugin" # That one is not technically a plugin, but by putting it in this list, we @@ -20,6 +21,14 @@ let ghc-lib = hself.ghc-lib_8_10_7_20220219; ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219; + stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" + inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; + + hls-stylish-haskell-plugin = + hself.callCabal2nixWithOptions "hls-stylish-haskell-plugin" + ./plugins/hls-stylish-haskell-plugin (pkgs.lib.concatStringsSep " " [ ]) + { }; + # Re-generate HLS drv excluding some plugins haskell-language-server = hself.callCabal2nixWithOptions "haskell-language-server" ./. diff --git a/flake.lock b/flake.lock index 37d5bc330c..e8fac4aff8 100644 --- a/flake.lock +++ b/flake.lock @@ -356,7 +356,8 @@ "pre-commit-hooks": "pre-commit-hooks", "ptr-poker": "ptr-poker", "retrie": "retrie", - "sphinx_rtd_theme": "sphinx_rtd_theme" + "sphinx_rtd_theme": "sphinx_rtd_theme", + "stylish-haskell-01220": "stylish-haskell-01220" } }, "sphinx_rtd_theme": { @@ -375,6 +376,18 @@ "rev": "34f81daaf52466366c80003db293d50075c1b896", "type": "github" } + }, + "stylish-haskell-01220": { + "flake": false, + "locked": { + "narHash": "sha256-uQIvhz/xRbKLHe9et+tHUVE9To5vt1Pz3+vvDEqJaLI=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/stylish-haskell-0.12.2.0/stylish-haskell-0.12.2.0.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/stylish-haskell-0.12.2.0/stylish-haskell-0.12.2.0.tar.gz" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2877a638d4..58b2749eaf 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,10 @@ url="/https://hackage.haskell.org/package/ptr-poker-0.1.2.8/ptr-poker-0.1.2.8.tar.gz"; flake = false; }; + stylish-haskell-01220 = { + url="/https://hackage.haskell.org/package/stylish-haskell-0.12.2.0/stylish-haskell-0.12.2.0.tar.gz"; + flake = false; + }; implicit-hie-cradle = { url="/https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz"; flake = false; From 0801b0c8b045dbb62329e1f81007f20ad5d3a5fc Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 13:14:39 -0400 Subject: [PATCH 17/42] fix default ghc lookup --- flake.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 58b2749eaf..e0862c578e 100644 --- a/flake.nix +++ b/flake.nix @@ -243,8 +243,7 @@ ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); }; - lookUp = key: if cases ? key then cases."${key}" else (pkgs.hlsHpkgs ghcVersion); - in { default = lookUp ghcVersion; } // cases; + in { default = cases."${ghcVersion}"; } // cases; ghc884 = supportedGHCs.ghc884; ghc8107 = supportedGHCs.ghc8107; From 67745f92c3cbc681af16ef40c30b3ecf661615b0 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 13:20:30 -0400 Subject: [PATCH 18/42] ghc884: fixup brittany version to 0.13.1.2 --- configuration-ghc-88.nix | 3 +++ flake.lock | 13 +++++++++++++ flake.nix | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/configuration-ghc-88.nix b/configuration-ghc-88.nix index eece4d17ba..17b6ecc75a 100644 --- a/configuration-ghc-88.nix +++ b/configuration-ghc-88.nix @@ -24,6 +24,9 @@ let stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; + brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312 + (pkgs.lib.concatStringsSep " " [ ]) { }; + hls-stylish-haskell-plugin = hself.callCabal2nixWithOptions "hls-stylish-haskell-plugin" ./plugins/hls-stylish-haskell-plugin (pkgs.lib.concatStringsSep " " [ ]) diff --git a/flake.lock b/flake.lock index e8fac4aff8..f2434dc4c6 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,17 @@ { "nodes": { + "brittany-01312": { + "flake": false, + "locked": { + "narHash": "sha256-4rDE2bu4C8cv1D6lkTtLxMwLRyDfIK70BnptSrygK60=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz" + } + }, "constraints-extras": { "flake": false, "locked": { @@ -336,6 +348,7 @@ }, "root": { "inputs": { + "brittany-01312": "brittany-01312", "constraints-extras": "constraints-extras", "flake-compat": "flake-compat", "flake-utils": "flake-utils", diff --git a/flake.nix b/flake.nix index e0862c578e..c8b7103e65 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,10 @@ url="/https://hackage.haskell.org/package/fourmolu-0.5.0.1/fourmolu-0.5.0.1.tar.gz"; flake = false; }; + brittany-01312 = { + url="/https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz"; + flake = false; + }; hlint = { url="/https://hackage.haskell.org/package/hlint-3.3.6/hlint-3.3.6.tar.gz"; flake = false; From 7f725e00c76c5bb01924f54e206b828c603ee5f6 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 13:22:38 -0400 Subject: [PATCH 19/42] ghc884: fixup aeson version to 1.5.2.0 --- configuration-ghc-88.nix | 3 +++ flake.lock | 13 +++++++++++++ flake.nix | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/configuration-ghc-88.nix b/configuration-ghc-88.nix index 17b6ecc75a..6bf22fa8d3 100644 --- a/configuration-ghc-88.nix +++ b/configuration-ghc-88.nix @@ -24,6 +24,9 @@ let stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; + aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520 + (pkgs.lib.concatStringsSep " " [ ]) { }; + brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312 (pkgs.lib.concatStringsSep " " [ ]) { }; diff --git a/flake.lock b/flake.lock index f2434dc4c6..5c36d3f66d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,17 @@ { "nodes": { + "aeson-1520": { + "flake": false, + "locked": { + "narHash": "sha256-btKp7CTOgC0wT33lROffARW9qr1jx9oKE5EWydaR52c=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/aeson-1.5.2.0/aeson-1.5.2.0.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/aeson-1.5.2.0/aeson-1.5.2.0.tar.gz" + } + }, "brittany-01312": { "flake": false, "locked": { @@ -348,6 +360,7 @@ }, "root": { "inputs": { + "aeson-1520": "aeson-1520", "brittany-01312": "brittany-01312", "constraints-extras": "constraints-extras", "flake-compat": "flake-compat", diff --git a/flake.nix b/flake.nix index c8b7103e65..bd346f3cfb 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,10 @@ url="/https://hackage.haskell.org/package/fourmolu-0.5.0.1/fourmolu-0.5.0.1.tar.gz"; flake = false; }; + aeson-1520= { + url="/https://hackage.haskell.org/package/aeson-1.5.2.0/aeson-1.5.2.0.tar.gz"; + flake = false; + }; brittany-01312 = { url="/https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz"; flake = false; From 72717b27bda72a0d3603315b5f9c463677870cd5 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 14:09:46 -0400 Subject: [PATCH 20/42] ghc884: fixup ormolu/fourmolu --- configuration-ghc-88.nix | 16 +++++++++++----- flake.lock | 13 +++++++++++++ flake.nix | 4 ++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/configuration-ghc-88.nix b/configuration-ghc-88.nix index 6bf22fa8d3..f8393c4d06 100644 --- a/configuration-ghc-88.nix +++ b/configuration-ghc-88.nix @@ -21,6 +21,8 @@ let ghc-lib = hself.ghc-lib_8_10_7_20220219; ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219; + fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { }; + stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; @@ -30,15 +32,19 @@ let brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312 (pkgs.lib.concatStringsSep " " [ ]) { }; - hls-stylish-haskell-plugin = - hself.callCabal2nixWithOptions "hls-stylish-haskell-plugin" - ./plugins/hls-stylish-haskell-plugin (pkgs.lib.concatStringsSep " " [ ]) - { }; + hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin" + ./plugins/hls-hlint-plugin + (pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { }; # Re-generate HLS drv excluding some plugins haskell-language-server = hself.callCabal2nixWithOptions "haskell-language-server" ./. - (pkgs.lib.concatStringsSep " " [ ]) { }; + (pkgs.lib.concatStringsSep " " [ + "-fpedantic" + "-f-hlint" + "-f-fourmolu" + "-f-ormolu" + ]) { }; # YOLO mkDerivation = args: diff --git a/flake.lock b/flake.lock index 5c36d3f66d..c73bd0fc2b 100644 --- a/flake.lock +++ b/flake.lock @@ -109,6 +109,18 @@ "url": "https://hackage.haskell.org/package/fourmolu-0.5.0.1/fourmolu-0.5.0.1.tar.gz" } }, + "fourmolu-0300": { + "flake": false, + "locked": { + "narHash": "sha256-SFBwhkXfDArITiBSxGSp2qf8gl+yBpWHglBB5aKeaBU=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/fourmolu-0.3.0.0/fourmolu-0.3.0.0.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/fourmolu-0.3.0.0/fourmolu-0.3.0.0.tar.gz" + } + }, "ghc-exactprint": { "flake": false, "locked": { @@ -366,6 +378,7 @@ "flake-compat": "flake-compat", "flake-utils": "flake-utils", "fourmolu": "fourmolu", + "fourmolu-0300": "fourmolu-0300", "ghc-exactprint": "ghc-exactprint", "ghc-exactprint-150": "ghc-exactprint-150", "gitignore": "gitignore", diff --git a/flake.nix b/flake.nix index bd346f3cfb..e92d863310 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,10 @@ url="/https://hackage.haskell.org/package/fourmolu-0.5.0.1/fourmolu-0.5.0.1.tar.gz"; flake = false; }; + fourmolu-0300 = { + url="/https://hackage.haskell.org/package/fourmolu-0.3.0.0/fourmolu-0.3.0.0.tar.gz"; + flake = false; + }; aeson-1520= { url="/https://hackage.haskell.org/package/aeson-1.5.2.0/aeson-1.5.2.0.tar.gz"; flake = false; From b26ca7038e0ffc278b89248b3aa677e7148648c3 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:11:45 -0400 Subject: [PATCH 21/42] add configuration tweak for ghc8107 --- configuration-ghc-810.nix | 59 +++++++++++++++++++++++++++++++++++++++ flake.nix | 3 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 configuration-ghc-810.nix diff --git a/configuration-ghc-810.nix b/configuration-ghc-810.nix new file mode 100644 index 0000000000..f8393c4d06 --- /dev/null +++ b/configuration-ghc-810.nix @@ -0,0 +1,59 @@ +# nix version of cabal-ghc901.project +{ pkgs, inputs }: + +let + disabledPlugins = [ + "hls-brittany-plugin" + "hls-hlint-plugin" + "hls-stylish-haskell-plugin" + "hls-haddock-comments-plugin" + "hls-tactics-plugin" + # That one is not technically a plugin, but by putting it in this list, we + # get it removed from the top level list of requirement and it is not pull + # in the nix shell. + "shake-bench" + ]; + + hpkgsOverride = hself: hsuper: + with pkgs.haskell.lib; { + hlsDisabledPlugins = disabledPlugins; + + ghc-lib = hself.ghc-lib_8_10_7_20220219; + ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219; + + fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { }; + + stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" + inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; + + aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520 + (pkgs.lib.concatStringsSep " " [ ]) { }; + + brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312 + (pkgs.lib.concatStringsSep " " [ ]) { }; + + hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin" + ./plugins/hls-hlint-plugin + (pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { }; + + # Re-generate HLS drv excluding some plugins + haskell-language-server = + hself.callCabal2nixWithOptions "haskell-language-server" ./. + (pkgs.lib.concatStringsSep " " [ + "-fpedantic" + "-f-hlint" + "-f-fourmolu" + "-f-ormolu" + ]) { }; + + # YOLO + mkDerivation = args: + hsuper.mkDerivation (args // { + jailbreak = true; + doCheck = false; + }); + }; +in { + inherit disabledPlugins; + tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; +} diff --git a/flake.nix b/flake.nix index e92d863310..2dd3388b2a 100644 --- a/flake.nix +++ b/flake.nix @@ -243,6 +243,7 @@ }; ghc88Config = (import ./configuration-ghc-88.nix) { inherit pkgs inputs; }; + ghc810Config = (import ./configuration-ghc-810.nix) { inherit pkgs inputs; }; ghc902Config = (import ./configuration-ghc-902.nix) { inherit pkgs inputs; }; ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; }; @@ -251,7 +252,7 @@ ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version); cases = { ghc884 = ghc88Config.tweakHpkgs (pkgs.hlsHpkgs "ghc884"); - ghc8107 = pkgs.hlsHpkgs "ghc8107"; + ghc8107 = ghc810Config.tweakHpkgs (pkgs.hlsHpkgs "ghc8107"); ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); }; From f72ddb85050dfaef69b4d4a1572bf6e53f16d151 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:16:10 -0400 Subject: [PATCH 22/42] rename configuration-ghc-xxx.nix files --- configuration-ghc-810.nix | 1 - configuration-ghc-88.nix | 1 - flake.nix | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configuration-ghc-810.nix b/configuration-ghc-810.nix index f8393c4d06..49be331855 100644 --- a/configuration-ghc-810.nix +++ b/configuration-ghc-810.nix @@ -1,4 +1,3 @@ -# nix version of cabal-ghc901.project { pkgs, inputs }: let diff --git a/configuration-ghc-88.nix b/configuration-ghc-88.nix index f8393c4d06..49be331855 100644 --- a/configuration-ghc-88.nix +++ b/configuration-ghc-88.nix @@ -1,4 +1,3 @@ -# nix version of cabal-ghc901.project { pkgs, inputs }: let diff --git a/flake.nix b/flake.nix index 2dd3388b2a..542a5b63ff 100644 --- a/flake.nix +++ b/flake.nix @@ -244,8 +244,8 @@ ghc88Config = (import ./configuration-ghc-88.nix) { inherit pkgs inputs; }; ghc810Config = (import ./configuration-ghc-810.nix) { inherit pkgs inputs; }; - ghc902Config = (import ./configuration-ghc-902.nix) { inherit pkgs inputs; }; - ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; }; + ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; }; + ghc922Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; }; # GHC versions supportedGHCs = let From e639e625508f7977a684a6d5cf555292234f696d Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:29:57 -0400 Subject: [PATCH 23/42] update hackage index --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 507998d23c..772175bf3a 100644 --- a/cabal.project +++ b/cabal.project @@ -43,7 +43,7 @@ package * write-ghc-environment-files: never -index-state: 2022-04-27T09:22:49Z +index-state: 2022-04-30T21:02:45Z constraints: hyphenation +embed, From 7116967476d98f3e4dc4c2903da0f4af4bcedf81 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:46:14 -0400 Subject: [PATCH 24/42] use current cabal/hackage to fetch ptr-poker in mkDevShell --- flake.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/flake.nix b/flake.nix index 542a5b63ff..e4f68a4fa7 100644 --- a/flake.nix +++ b/flake.nix @@ -308,7 +308,6 @@ buildInputs = [ # our compiling toolchain hpkgs.ghc - hpkgs.ptr-poker pkgs.cabal-install # @guibou: I'm not sure hie-bios is needed ghcDefault.hie-bios From bf7c5fef42427a02ecdfb5567352b679e74e2ca4 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 21:42:37 -0400 Subject: [PATCH 25/42] reinstate .pre-commit.yaml --- .pre-commit-config.yaml.bak => .pre-commit-config.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .pre-commit-config.yaml.bak => .pre-commit-config.yaml (100%) diff --git a/.pre-commit-config.yaml.bak b/.pre-commit-config.yaml similarity index 100% rename from .pre-commit-config.yaml.bak rename to .pre-commit-config.yaml From e81b50b3ea386890ff546db416049a7e831b125c Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sun, 1 May 2022 12:47:18 -0400 Subject: [PATCH 26/42] nix: temporary disable "build binaries" from the work flow --- .github/workflows/nix.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index eff8fa2123..a175ff0c95 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -100,10 +100,10 @@ jobs: with: name: haskell-language-server authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }} - - name: Build development shell - run: nix develop --print-build-logs --profile dev - - name: Build all development shell (without nix dependencies) - run: nix develop --print-build-logs .#all-simple-dev-shells --profile dev + # - name: Build development shell + # run: nix develop --print-build-logs --profile dev + # - name: Build all development shell (without nix dependencies) + # run: nix develop --print-build-logs .#all-simple-dev-shells --profile dev # We only build nix dev shell for current GHC version because some are # failing with different GHC version on darwin. - name: Build development shell with nix dependencies for current GHC version @@ -111,8 +111,10 @@ jobs: - name: Push development shell if: ${{ env.HAS_TOKEN == 'true' }} run: cachix push haskell-language-server dev - - name: Build binaries - run: nix build --print-build-logs + # smunix: temporarily disabling this to allow the builds to complete and + # push binaries to caches. Will re-enable later. + # - name: Build binaries + # run: nix build --print-build-logs - name: Build all binaries run: nix build --print-build-logs .#all-haskell-language-server - name: Push binaries From 7ffa9ed6dfb214dab3e6ff6e1373c229c9a8e4c6 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 2 May 2022 05:39:45 -0400 Subject: [PATCH 27/42] nix: temporary disable builds and partially populate cachix --- .github/workflows/nix.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index a175ff0c95..992f355cce 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -100,19 +100,19 @@ jobs: with: name: haskell-language-server authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }} + # smunix: temporarily disabling this to allow the builds to complete and + # push binaries to caches. Will re-enable later. # - name: Build development shell # run: nix develop --print-build-logs --profile dev # - name: Build all development shell (without nix dependencies) # run: nix develop --print-build-logs .#all-simple-dev-shells --profile dev # We only build nix dev shell for current GHC version because some are # failing with different GHC version on darwin. - - name: Build development shell with nix dependencies for current GHC version - run: nix develop --print-build-logs .#all-nix-dev-shells --profile dev - - name: Push development shell - if: ${{ env.HAS_TOKEN == 'true' }} - run: cachix push haskell-language-server dev - # smunix: temporarily disabling this to allow the builds to complete and - # push binaries to caches. Will re-enable later. + # - name: Build development shell with nix dependencies for current GHC version + # run: nix develop --print-build-logs .#all-nix-dev-shells --profile dev + # - name: Push development shell + # if: ${{ env.HAS_TOKEN == 'true' }} + # run: cachix push haskell-language-server dev # - name: Build binaries # run: nix build --print-build-logs - name: Build all binaries From cbeb2e980d80f1ac92c58ffae50432423581f2c0 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 2 May 2022 12:48:55 -0400 Subject: [PATCH 28/42] nix: temporarily disable ghc 884 and 8107 --- flake.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index e4f68a4fa7..b5e9467ce7 100644 --- a/flake.nix +++ b/flake.nix @@ -388,8 +388,8 @@ # Developement shell with only compiler simpleDevShells = { haskell-language-server-dev = mkDevShell ghcDefault "cabal.project"; - haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; - haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; + # haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; + # haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project"; }; @@ -397,16 +397,16 @@ # Developement shell, haskell packages are also provided by nix nixDevShells = { haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; - haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; - haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; + # haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; + # haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; }; allPackages = { haskell-language-server = mkExe ghcDefault; - haskell-language-server-884 = mkExe ghc884; - haskell-language-server-8107 = mkExe ghc8107; + # haskell-language-server-884 = mkExe ghc884; + # haskell-language-server-8107 = mkExe ghc8107; haskell-language-server-902 = mkExe ghc902; haskell-language-server-922 = mkExe ghc922; }; From 39fa0eb23d23e3bf586ee41c044c2a7d161cb5df Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 2 May 2022 12:57:39 -0400 Subject: [PATCH 29/42] nix: temporarily disable nix develop run --- .github/workflows/nix.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 992f355cce..11790185a6 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -67,9 +67,9 @@ jobs: name: haskell-language-server # Disable pushing, we will do that in job `build` skipPush: true - - run: | - nix develop --print-build-logs --command cabal update - nix develop --print-build-logs --command cabal build + # - run: | + # nix develop --print-build-logs --command cabal update + # nix develop --print-build-logs --command cabal build # Build and then push HLS binaries with developmet shell to cachix # This job runs when From 3b295888edc410014bd728bca8bf45ef49d3145e Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Tue, 3 May 2022 03:28:13 -0400 Subject: [PATCH 30/42] nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" --- .github/workflows/nix.yml | 36 ++++++++++++++++++------------------ flake.nix | 12 ++++++------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 11790185a6..8458eea89c 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -67,9 +67,9 @@ jobs: name: haskell-language-server # Disable pushing, we will do that in job `build` skipPush: true - # - run: | - # nix develop --print-build-logs --command cabal update - # nix develop --print-build-logs --command cabal build + - run: | + nix develop --print-build-logs --command cabal update + nix develop --print-build-logs --command cabal build # Build and then push HLS binaries with developmet shell to cachix # This job runs when @@ -100,23 +100,23 @@ jobs: with: name: haskell-language-server authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }} - # smunix: temporarily disabling this to allow the builds to complete and - # push binaries to caches. Will re-enable later. - # - name: Build development shell - # run: nix develop --print-build-logs --profile dev - # - name: Build all development shell (without nix dependencies) - # run: nix develop --print-build-logs .#all-simple-dev-shells --profile dev + - name: Build development shell + run: nix develop --print-build-logs --profile dev + - name: Build all development shell (without nix dependencies) + run: nix develop --print-build-logs .#all-simple-dev-shells --profile dev # We only build nix dev shell for current GHC version because some are # failing with different GHC version on darwin. - # - name: Build development shell with nix dependencies for current GHC version - # run: nix develop --print-build-logs .#all-nix-dev-shells --profile dev - # - name: Push development shell - # if: ${{ env.HAS_TOKEN == 'true' }} - # run: cachix push haskell-language-server dev - # - name: Build binaries - # run: nix build --print-build-logs - - name: Build all binaries - run: nix build --print-build-logs .#all-haskell-language-server + - name: Build development shell with nix dependencies for current GHC version + run: nix develop --print-build-logs .#all-nix-dev-shells --profile dev + - name: Push development shell + if: ${{ env.HAS_TOKEN == 'true' }} + run: cachix push haskell-language-server dev + - name: Build binaries + run: nix build --print-build-logs + # smunix: "Build all binaries" takes too long to run and doesn't contribute + # to caching to cachix for now; so I'm disabling it for now. + # - name: Build all binaries + # run: nix build --print-build-logs .#all-haskell-language-server - name: Push binaries if: ${{ env.HAS_TOKEN == 'true' }} run: nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server diff --git a/flake.nix b/flake.nix index b5e9467ce7..e4f68a4fa7 100644 --- a/flake.nix +++ b/flake.nix @@ -388,8 +388,8 @@ # Developement shell with only compiler simpleDevShells = { haskell-language-server-dev = mkDevShell ghcDefault "cabal.project"; - # haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; - # haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; + haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; + haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project"; }; @@ -397,16 +397,16 @@ # Developement shell, haskell packages are also provided by nix nixDevShells = { haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; - # haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; - # haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; + haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; + haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; }; allPackages = { haskell-language-server = mkExe ghcDefault; - # haskell-language-server-884 = mkExe ghc884; - # haskell-language-server-8107 = mkExe ghc8107; + haskell-language-server-884 = mkExe ghc884; + haskell-language-server-8107 = mkExe ghc8107; haskell-language-server-902 = mkExe ghc902; haskell-language-server-922 = mkExe ghc922; }; From e5079224418c0c14269ed7ed436e08a1dffc2379 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Tue, 3 May 2022 10:47:11 -0400 Subject: [PATCH 31/42] nix: noop push commit to test cachix --- .github/workflows/nix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 8458eea89c..04ddf09069 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -114,7 +114,7 @@ jobs: - name: Build binaries run: nix build --print-build-logs # smunix: "Build all binaries" takes too long to run and doesn't contribute - # to caching to cachix for now; so I'm disabling it for now. + # to caching to cachix for now; so I'm temporarily disabling it for now. # - name: Build all binaries # run: nix build --print-build-logs .#all-haskell-language-server - name: Push binaries From 0818140b6ff0149fd7641809e4fc115249493585 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Tue, 3 May 2022 15:05:55 -0400 Subject: [PATCH 32/42] nix: touch flake.nix, remove ghc 884 --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index e4f68a4fa7..fb353ac7ac 100644 --- a/flake.nix +++ b/flake.nix @@ -388,7 +388,7 @@ # Developement shell with only compiler simpleDevShells = { haskell-language-server-dev = mkDevShell ghcDefault "cabal.project"; - haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; + # haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project"; @@ -397,7 +397,7 @@ # Developement shell, haskell packages are also provided by nix nixDevShells = { haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; - haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; + # haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; @@ -405,7 +405,7 @@ allPackages = { haskell-language-server = mkExe ghcDefault; - haskell-language-server-884 = mkExe ghc884; + # haskell-language-server-884 = mkExe ghc884; haskell-language-server-8107 = mkExe ghc8107; haskell-language-server-902 = mkExe ghc902; haskell-language-server-922 = mkExe ghc922; From 87834874562885d564c919254687765dde01f424 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 7 May 2022 12:00:29 -0400 Subject: [PATCH 33/42] nix: rm ghc 810, ghc88 + disableLibraryProfiling --- configuration-ghc-810.nix | 58 --------------------------------------- configuration-ghc-88.nix | 58 --------------------------------------- configuration-ghc-90.nix | 45 ++++++++++++++++++++++++++++++ configuration-ghc-92.nix | 39 ++++++++++++++++++++++++++ flake.nix | 14 ++-------- 5 files changed, 86 insertions(+), 128 deletions(-) delete mode 100644 configuration-ghc-810.nix delete mode 100644 configuration-ghc-88.nix create mode 100644 configuration-ghc-90.nix create mode 100644 configuration-ghc-92.nix diff --git a/configuration-ghc-810.nix b/configuration-ghc-810.nix deleted file mode 100644 index 49be331855..0000000000 --- a/configuration-ghc-810.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ pkgs, inputs }: - -let - disabledPlugins = [ - "hls-brittany-plugin" - "hls-hlint-plugin" - "hls-stylish-haskell-plugin" - "hls-haddock-comments-plugin" - "hls-tactics-plugin" - # That one is not technically a plugin, but by putting it in this list, we - # get it removed from the top level list of requirement and it is not pull - # in the nix shell. - "shake-bench" - ]; - - hpkgsOverride = hself: hsuper: - with pkgs.haskell.lib; { - hlsDisabledPlugins = disabledPlugins; - - ghc-lib = hself.ghc-lib_8_10_7_20220219; - ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219; - - fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { }; - - stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" - inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; - - aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520 - (pkgs.lib.concatStringsSep " " [ ]) { }; - - brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312 - (pkgs.lib.concatStringsSep " " [ ]) { }; - - hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin" - ./plugins/hls-hlint-plugin - (pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { }; - - # Re-generate HLS drv excluding some plugins - haskell-language-server = - hself.callCabal2nixWithOptions "haskell-language-server" ./. - (pkgs.lib.concatStringsSep " " [ - "-fpedantic" - "-f-hlint" - "-f-fourmolu" - "-f-ormolu" - ]) { }; - - # YOLO - mkDerivation = args: - hsuper.mkDerivation (args // { - jailbreak = true; - doCheck = false; - }); - }; -in { - inherit disabledPlugins; - tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; -} diff --git a/configuration-ghc-88.nix b/configuration-ghc-88.nix deleted file mode 100644 index 49be331855..0000000000 --- a/configuration-ghc-88.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ pkgs, inputs }: - -let - disabledPlugins = [ - "hls-brittany-plugin" - "hls-hlint-plugin" - "hls-stylish-haskell-plugin" - "hls-haddock-comments-plugin" - "hls-tactics-plugin" - # That one is not technically a plugin, but by putting it in this list, we - # get it removed from the top level list of requirement and it is not pull - # in the nix shell. - "shake-bench" - ]; - - hpkgsOverride = hself: hsuper: - with pkgs.haskell.lib; { - hlsDisabledPlugins = disabledPlugins; - - ghc-lib = hself.ghc-lib_8_10_7_20220219; - ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219; - - fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { }; - - stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" - inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; - - aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520 - (pkgs.lib.concatStringsSep " " [ ]) { }; - - brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312 - (pkgs.lib.concatStringsSep " " [ ]) { }; - - hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin" - ./plugins/hls-hlint-plugin - (pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { }; - - # Re-generate HLS drv excluding some plugins - haskell-language-server = - hself.callCabal2nixWithOptions "haskell-language-server" ./. - (pkgs.lib.concatStringsSep " " [ - "-fpedantic" - "-f-hlint" - "-f-fourmolu" - "-f-ormolu" - ]) { }; - - # YOLO - mkDerivation = args: - hsuper.mkDerivation (args // { - jailbreak = true; - doCheck = false; - }); - }; -in { - inherit disabledPlugins; - tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; -} diff --git a/configuration-ghc-90.nix b/configuration-ghc-90.nix new file mode 100644 index 0000000000..2a19f397aa --- /dev/null +++ b/configuration-ghc-90.nix @@ -0,0 +1,45 @@ +{ pkgs, inputs }: + +let + disabledPlugins = [ "hls-brittany-plugin" "hls-stylish-haskell-plugin" ]; + + hpkgsOverride = hself: hsuper: + with pkgs.haskell.lib; + { + hlsDisabledPlugins = disabledPlugins; + # YOLO + mkDerivation = args: + hsuper.mkDerivation (args // { + jailbreak = true; + doCheck = false; + }); + } // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) { + # ptr-poker breaks on MacOS without SSE2 optimizations + # https://github.com/nikita-volkov/ptr-poker/issues/11 + ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { }; + + ghc-lib = hself.ghc-lib_9_2_2_20220307; + ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307; + ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_3; + + Cabal = hself.Cabal_3_6_3_0; + ormolu = hself.ormolu_0_4_0_0; + fourmolu = hself.fourmolu_0_6_0_0; + + # Hlint is still broken + hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { }); + + hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin" + ./plugins/hls-hlint-plugin + (pkgs.lib.concatStringsSep " " [ "-fhlint34" "-fghc-lib" ]) { }; + + # Re-generate HLS drv excluding some plugins + haskell-language-server = + hself.callCabal2nixWithOptions "haskell-language-server" ./. + (pkgs.lib.concatStringsSep " " [ "-f-brittany" "-f-stylishhaskell" ]) + { }; + }); +in { + inherit disabledPlugins; + tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; +} diff --git a/configuration-ghc-92.nix b/configuration-ghc-92.nix new file mode 100644 index 0000000000..bff2a1e772 --- /dev/null +++ b/configuration-ghc-92.nix @@ -0,0 +1,39 @@ +{ pkgs, inputs }: + +let + disabledPlugins = [ + # That one is not technically a plugin, but by putting it in this list, we + # get it removed from the top level list of requirement and it is not pull + # in the nix shell. + "shake-bench" + ]; + + hpkgsOverride = hself: hsuper: + with pkgs.haskell.lib; + { + hlsDisabledPlugins = disabledPlugins; + # YOLO + mkDerivation = args: + hsuper.mkDerivation (args // { + jailbreak = true; + doCheck = false; + }); + } // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) { + # ptr-poker breaks on MacOS without SSE2 optimizations + # https://github.com/nikita-volkov/ptr-poker/issues/11 + ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { }; + + ghc-exactprint = + hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { }; + # Hlint is still broken + hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { }); + + # Re-generate HLS drv excluding some plugins + haskell-language-server = + hself.callCabal2nixWithOptions "haskell-language-server" ./. + (pkgs.lib.concatStringsSep " " [ "-fpedantic" "-f-hlint" ]) { }; + }); +in { + inherit disabledPlugins; + tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; +} diff --git a/flake.nix b/flake.nix index fb353ac7ac..72910130ed 100644 --- a/flake.nix +++ b/flake.nix @@ -123,6 +123,8 @@ in hsuper.mkDerivation (args // { jailbreak = if broken then true else jailbreak; doCheck = if broken then false else check; + enableLibraryProfiling = false; + doHaddock = false; }); }; gitignoreSource = (import gitignore { inherit lib; }).gitignoreSource; @@ -242,8 +244,6 @@ }; }; - ghc88Config = (import ./configuration-ghc-88.nix) { inherit pkgs inputs; }; - ghc810Config = (import ./configuration-ghc-810.nix) { inherit pkgs inputs; }; ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; }; ghc922Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; }; @@ -251,15 +251,11 @@ supportedGHCs = let ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version); cases = { - ghc884 = ghc88Config.tweakHpkgs (pkgs.hlsHpkgs "ghc884"); - ghc8107 = ghc810Config.tweakHpkgs (pkgs.hlsHpkgs "ghc8107"); ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); }; in { default = cases."${ghcVersion}"; } // cases; - ghc884 = supportedGHCs.ghc884; - ghc8107 = supportedGHCs.ghc8107; ghc902 = supportedGHCs.ghc902; ghc922 = supportedGHCs.ghc922; ghcDefault = supportedGHCs.default; @@ -388,8 +384,6 @@ # Developement shell with only compiler simpleDevShells = { haskell-language-server-dev = mkDevShell ghcDefault "cabal.project"; - # haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project"; - haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project"; haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project"; }; @@ -397,16 +391,12 @@ # Developement shell, haskell packages are also provided by nix nixDevShells = { haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; - # haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project"; - haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project"; haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; }; allPackages = { haskell-language-server = mkExe ghcDefault; - # haskell-language-server-884 = mkExe ghc884; - haskell-language-server-8107 = mkExe ghc8107; haskell-language-server-902 = mkExe ghc902; haskell-language-server-922 = mkExe ghc922; }; From 349a8770e5320e20a379046d59f095b63d4c60c0 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 7 May 2022 12:11:13 -0400 Subject: [PATCH 34/42] nix: build all binaries again --- .github/workflows/nix.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 04ddf09069..eff8fa2123 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -113,10 +113,8 @@ jobs: run: cachix push haskell-language-server dev - name: Build binaries run: nix build --print-build-logs - # smunix: "Build all binaries" takes too long to run and doesn't contribute - # to caching to cachix for now; so I'm temporarily disabling it for now. - # - name: Build all binaries - # run: nix build --print-build-logs .#all-haskell-language-server + - name: Build all binaries + run: nix build --print-build-logs .#all-haskell-language-server - name: Push binaries if: ${{ env.HAS_TOKEN == 'true' }} run: nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server From afe7068ba68d2053f3abdd1b5c67a57768fe9b00 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sun, 8 May 2022 17:18:01 -0400 Subject: [PATCH 35/42] Update flake.nix Co-authored-by: Michael Peyton Jones --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 72910130ed..655c5e6664 100644 --- a/flake.nix +++ b/flake.nix @@ -428,6 +428,8 @@ checks = { pre-commit-check = pre-commit-check ghcDefault; }; + # The attributes for the default shell and package changed in recent versions of Nix, + # these are here for backwards compatibility with the old versions. devShell = devShells.default; defaultPackage = packages.default; }); From 76d7692d517f0d0f918fe8896c897a417ab2bac5 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sun, 8 May 2022 17:18:11 -0400 Subject: [PATCH 36/42] Update flake.nix Co-authored-by: Michael Peyton Jones --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 655c5e6664..7f940b2302 100644 --- a/flake.nix +++ b/flake.nix @@ -274,6 +274,7 @@ overrides = [ pkgs.poetry2nix.defaultPoetryOverrides (self: super: { + # The RTD theme doesn't work with newer docutils docutils = pkgs.python3Packages.callPackage ./docutils.nix {}; }) ]; From 9a1bdd11da12289aa213286fa3937397c0e3b7ed Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sun, 8 May 2022 17:18:32 -0400 Subject: [PATCH 37/42] Update flake.nix Co-authored-by: Michael Peyton Jones --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 7f940b2302..20a8c1dd4d 100644 --- a/flake.nix +++ b/flake.nix @@ -248,6 +248,8 @@ ghc922Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; }; # GHC versions + # While HLS still works fine with 8.10 GHCs, we only support the versions that are cached + # by upstream nixpkgs, which now only includes GHC version 9+ supportedGHCs = let ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version); cases = { From c8d13e3edd9dfab08cf18b3bb0c1613207f2c256 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sun, 8 May 2022 17:26:55 -0400 Subject: [PATCH 38/42] revert change made on comment --- cabal.project | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index 772175bf3a..c4d3e08b8f 100644 --- a/cabal.project +++ b/cabal.project @@ -37,8 +37,8 @@ optional-packages: vendored/*/*.cabal tests: true package * - -- ghc 8.10.7 fails to build ghc-lib-9.2.2 - -- ghc-options: --haddock + -- ghc 8.10 cannot build ghc-lib 9.2 with --haddock + -- ghc-options: -haddock test-show-details: direct write-ghc-environment-files: never From bc72be4cd05d694a7d5a89d639c28ea6e62bf2c1 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sun, 8 May 2022 17:29:53 -0400 Subject: [PATCH 39/42] rm myst-parser.nix --- myst-parser.nix | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 myst-parser.nix diff --git a/myst-parser.nix b/myst-parser.nix deleted file mode 100644 index 8f332d5f8c..0000000000 --- a/myst-parser.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, markdown-it-py -, mdit-py-plugins -, pyyaml -, docutils -, sphinx -}: - -buildPythonPackage rec { - pname = "myst-parser"; - version = "0.16.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "14lzbhciw7ksi219lrcy9afglmg5mx0rmfvrr2x8ssghv4kf8cdy"; - }; - - propagatedBuildInputs = [ - markdown-it-py - mdit-py-plugins - pyyaml - docutils - sphinx - ]; - - meta = with lib; { - description = "An extended commonmark compliant parser, with bridges to docutils & sphinx"; - homepage = https://github.com/executablebooks/MyST-Parser; - license = licenses.mit; - }; -} From cff1918cdfc8ecbbb02f3d43326f03958a997ce1 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Thu, 12 May 2022 07:20:47 -0400 Subject: [PATCH 40/42] fix typo (thanks @guibou) --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 20a8c1dd4d..f9f30e9c08 100644 --- a/flake.nix +++ b/flake.nix @@ -395,7 +395,7 @@ nixDevShells = { haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; - haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project"; + haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc922 "cabal.project"; }; allPackages = { From 45194c9b03dadd32073a6bcab596f1c7ab69a87e Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Thu, 12 May 2022 07:24:04 -0400 Subject: [PATCH 41/42] explain why we disable library profiling with nix --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index f9f30e9c08..51d0d5e43a 100644 --- a/flake.nix +++ b/flake.nix @@ -123,6 +123,8 @@ in hsuper.mkDerivation (args // { jailbreak = if broken then true else jailbreak; doCheck = if broken then false else check; + # Library profiling is disabled as it causes long compilation time + # on our CI jobs. Nix users are free tor revert this anytime. enableLibraryProfiling = false; doHaddock = false; }); From 3bcb951734e0813297b92163edb57311329f1720 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Thu, 12 May 2022 08:31:41 -0400 Subject: [PATCH 42/42] ghc922, disable "hls-hlint-plugin" --- configuration-ghc-92.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/configuration-ghc-92.nix b/configuration-ghc-92.nix index bff2a1e772..1577a7a2cf 100644 --- a/configuration-ghc-92.nix +++ b/configuration-ghc-92.nix @@ -2,6 +2,7 @@ let disabledPlugins = [ + "hls-hlint-plugin" # That one is not technically a plugin, but by putting it in this list, we # get it removed from the top level list of requirement and it is not pull # in the nix shell.