From d5d936f904049cdb502f3073b662a8506e459681 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 6 Mar 2022 11:43:57 +0000 Subject: [PATCH 01/38] Get rid of cabal-ghc90.project --- .gitlab-ci.yml | 2 +- bindist/ghcs | 2 +- bindist/ghcs-FreeBSD | 2 +- bindist/ghcs-Msys | 2 +- cabal-ghc90.project | 58 ----------------------------------------- cabal.project | 6 ++--- docs/troubleshooting.md | 4 +-- flake.nix | 4 +-- 8 files changed, 11 insertions(+), 69 deletions(-) delete mode 100644 cabal-ghc90.project diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d4ad3ccc5..39025fb2b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ variables: - GHC_VERSION: 8.10.7 CABAL_PROJECT: cabal.project - GHC_VERSION: 9.0.2 - CABAL_PROJECT: cabal-ghc90.project + CABAL_PROJECT: cabal.project - GHC_VERSION: 9.2.2 CABAL_PROJECT: cabal-ghc92.project - GHC_VERSION: 9.2.1 diff --git a/bindist/ghcs b/bindist/ghcs index 32cfc187ed..154935c5ae 100644 --- a/bindist/ghcs +++ b/bindist/ghcs @@ -1,6 +1,6 @@ 8.6.5,cabal.project 8.8.4,cabal.project 8.10.7,cabal.project -9.0.2,cabal-ghc90.project +9.0.2,cabal.project 9.2.1,cabal-ghc92.project 9.2.2,cabal-ghc92.project diff --git a/bindist/ghcs-FreeBSD b/bindist/ghcs-FreeBSD index cab2c69bb2..a1b4b6e0bf 100644 --- a/bindist/ghcs-FreeBSD +++ b/bindist/ghcs-FreeBSD @@ -1,2 +1,2 @@ 8.10.7,cabal.project -9.0.2,cabal-ghc90.project +9.0.2,cabal.project diff --git a/bindist/ghcs-Msys b/bindist/ghcs-Msys index a6210abe73..37998b56f1 100644 --- a/bindist/ghcs-Msys +++ b/bindist/ghcs-Msys @@ -1,4 +1,4 @@ 8.10.7,cabal.project -9.0.2,cabal-ghc90.project +9.0.2,cabal.project 9.2.2,cabal-ghc92.project 9.2.1,cabal-ghc92.project diff --git a/cabal-ghc90.project b/cabal-ghc90.project deleted file mode 100644 index 06e0d35262..0000000000 --- a/cabal-ghc90.project +++ /dev/null @@ -1,58 +0,0 @@ -packages: - ./ - ./hie-compat - ./shake-bench - ./hls-graph - ./ghcide - ./hls-plugin-api - ./hls-test-utils - ./plugins/hls-tactics-plugin - ./plugins/hls-brittany-plugin - ./plugins/hls-stylish-haskell-plugin - ./plugins/hls-fourmolu-plugin - ./plugins/hls-class-plugin - ./plugins/hls-eval-plugin - ./plugins/hls-explicit-imports-plugin - ./plugins/hls-refine-imports-plugin - ./plugins/hls-hlint-plugin - ./plugins/hls-rename-plugin - ./plugins/hls-retrie-plugin - ./plugins/hls-haddock-comments-plugin - ./plugins/hls-splice-plugin - ./plugins/hls-qualify-imported-names-plugin - ./plugins/hls-floskell-plugin - ./plugins/hls-pragmas-plugin - ./plugins/hls-module-name-plugin - ./plugins/hls-ormolu-plugin - ./plugins/hls-call-hierarchy-plugin - ./plugins/hls-alternate-number-format-plugin - ./plugins/hls-selection-range-plugin - ./plugins/hls-change-type-signature-plugin - -tests: true - -package * - ghc-options: -haddock - test-show-details: direct - -write-ghc-environment-files: never - -index-state: 2022-04-27T09:22:49Z - -constraints: - --- although we are not building all plugins cabal solver phase is run for all packages --- this way we track explicitly all transitive dependencies which need support for ghc-9 -allow-newer: - - -- brittany: update ghc bounds in hls.cabal when those are removed - -- https://github.com/lspitzner/multistate/pull/8 - multistate:base, - -- https://github.com/lspitzner/data-tree-print/pull/3 - data-tree-print:base, - -- https://github.com/lspitzner/butcher/pull/8 - butcher:base, - - -- ghc-9.0.2 specific - -- for ghcide:test via ghc-typelits-knownnat - ghc-typelits-natnormalise:ghc-bignum diff --git a/cabal.project b/cabal.project index ea1114f19a..28c44b6895 100644 --- a/cabal.project +++ b/cabal.project @@ -52,6 +52,6 @@ constraints: hlint +ghc-lib allow-newer: - -- for shake-bench - Chart-diagrams:diagrams-core, - SVGFonts:diagrams-core + stylish-haskell:Cabal, + stylish-haskell:ghc-lib-parser, + stylish-haskell:aeson, diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 68642dada1..192ea006f8 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -174,7 +174,7 @@ cabal update && cabal install :pkg:haskell-language-server If you are compiling with a ghc version with a specific `cabal-ghc${ghcVersion}.project` in the repo you will have to use it. For example for ghc-9.0.x: ```bash -cabal update && cabal install :pkg:haskell-language-server --project-file=cabal-ghc90.project +cabal update && cabal install pkg:haskell-language-server ``` Or with `stack`: @@ -192,7 +192,7 @@ ghcup compile hls -v 1.6.1.0 --ghc 8.10.7 as it uses cabal underneath you might need to use a specific cabal.project for some ghc versions: ```bash -ghcup compile hls -v 1.6.1.0 --ghc 9.0.2 --cabal-project cabal-ghc90.project +ghcup compile hls -v 1.6.1.0 --ghc 9.0.2 ``` ### Preprocessors diff --git a/flake.nix b/flake.nix index 1676dbed47..caed0ff6fe 100644 --- a/flake.nix +++ b/flake.nix @@ -336,7 +336,7 @@ 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-ghc90.project"; + haskell-language-server-901-dev = mkDevShell ghc901 "cabal.project"; haskell-language-server-921-dev = mkDevShell ghc921 "cabal-ghc92.project"; }; @@ -345,7 +345,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-ghc90.project"; + haskell-language-server-901-dev-nix = mkDevShellWithNixDeps ghc901 "cabal.project"; haskell-language-server-921-dev-nix = mkDevShellWithNixDeps ghc921 "cabal-ghc92.project"; }; From c2313edd936f1049a824c8ee97df60a108f28c73 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 6 Mar 2022 13:10:55 +0000 Subject: [PATCH 02/38] fix trailing comma --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 28c44b6895..1a5332d460 100644 --- a/cabal.project +++ b/cabal.project @@ -54,4 +54,4 @@ constraints: allow-newer: stylish-haskell:Cabal, stylish-haskell:ghc-lib-parser, - stylish-haskell:aeson, + stylish-haskell:aeson From 8c8fa89c35dc18c4e0f5ea999bb61deca0b6c95e Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 6 Mar 2022 13:55:36 +0000 Subject: [PATCH 03/38] hie-compat does not need ghc-lib on GHC 9.x --- hie-compat/hie-compat.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hie-compat/hie-compat.cabal b/hie-compat/hie-compat.cabal index 13b0cb3ef1..0683c7a628 100644 --- a/hie-compat/hie-compat.cabal +++ b/hie-compat/hie-compat.cabal @@ -24,7 +24,7 @@ library default-language: Haskell2010 build-depends: base < 4.17, array, bytestring, containers, directory, filepath, transformers - if flag(ghc-lib) + if flag(ghc-lib) && impl(ghc < 9) build-depends: ghc-lib < 9.0 else build-depends: ghc, ghc-boot From 0115629f2ae6c59b95c5d8719aece2e058da86fc Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 29 Apr 2022 10:38:44 +0100 Subject: [PATCH 04/38] 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 1a5332d460..5e2a1a1635 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 afcd63a7856fc55888772c48001a704ec297451c Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 29 Apr 2022 11:32:17 +0100 Subject: [PATCH 05/38] Add ghc-lib flag for hls-hlint-plugin --- cabal.project | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cabal.project b/cabal.project index 5e2a1a1635..6b8338ccc6 100644 --- a/cabal.project +++ b/cabal.project @@ -46,10 +46,8 @@ write-ghc-environment-files: never index-state: 2022-04-27T09:22:49Z constraints: - hyphenation +embed, - -- remove this when hlint sets ghc-lib to true by default - -- https://github.com/ndmitchell/hlint/issues/1376 - hlint +ghc-lib + hyphenation +embed, + hls-hlint-plugin +ghc-lib, allow-newer: stylish-haskell:Cabal, From b8a8dbd3db778159088bee9db0b00010c65ba675 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 29 Apr 2022 18:09:40 +0100 Subject: [PATCH 06/38] remove unnecessary allow-newer entries --- cabal.project | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cabal.project b/cabal.project index 6b8338ccc6..70371297a7 100644 --- a/cabal.project +++ b/cabal.project @@ -49,7 +49,3 @@ constraints: hyphenation +embed, hls-hlint-plugin +ghc-lib, -allow-newer: - stylish-haskell:Cabal, - stylish-haskell:ghc-lib-parser, - stylish-haskell:aeson From a9a029957afe9409e8632613f7bbd23d02e3df6b Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 25 Apr 2022 06:34:49 -0400 Subject: [PATCH 07/38] 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 f6f92dc2611e41d76103c855d22c401414f8f153 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 25 Apr 2022 06:37:56 -0400 Subject: [PATCH 08/38] nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 --- ...guration-ghc-921.nix => configuration-ghc-922.nix | 2 -- flake.nix | 12 +++++------- 2 files changed, 5 insertions(+), 9 deletions(-) rename configuration-ghc-921.nix => configuration-ghc-922.nix (94%) diff --git a/configuration-ghc-921.nix b/configuration-ghc-922.nix similarity index 94% rename from configuration-ghc-921.nix rename to configuration-ghc-922.nix index d8660da1d9..fc0ee1ed0b 100644 --- a/configuration-ghc-921.nix +++ b/configuration-ghc-922.nix @@ -19,14 +19,12 @@ let hlsDisabledPlugins = disabledPlugins; fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {}; - primitive-extras = hself.primitive-extras_0_10_1_2; ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint {}; constraints-extras = hself.callCabal2nix "constraints-extras" inputs.constraints-extras {}; retrie = hself.callCabal2nix "retrie" inputs.retrie {}; # Hlint is still broken hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint {}); - hiedb = hself.hiedb_0_4_1_0; # Re-generate HLS drv excluding some plugins haskell-language-server = diff --git a/flake.nix b/flake.nix index caed0ff6fe..8526d15f39 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-ghc92.project"; + haskell-language-server-922-dev = mkDevShell ghc921 "cabal-ghc92.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-ghc92.project"; + haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal-ghc92.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 25df34a2a1493845d22fa3c7f9fc8868dd8702a7 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 25 Apr 2022 19:41:41 -0400 Subject: [PATCH 09/38] 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 8526d15f39..45ae9177f2 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 0316b29053b0e1a6d45c5f668ef421e29514c113 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Tue, 26 Apr 2022 07:25:52 -0400 Subject: [PATCH 10/38] fix devShells and packages default --- .gitignore | 2 +- ...config.yaml => .pre-commit-config.yaml.bak | 0 ...n-ghc-901.nix => configuration-ghc-902.nix | 5 +--- flake.nix | 28 +++++++++++-------- 4 files changed, 18 insertions(+), 17 deletions(-) rename .pre-commit-config.yaml => .pre-commit-config.yaml.bak (100%) rename configuration-ghc-901.nix => configuration-ghc-902.nix (83%) 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/configuration-ghc-901.nix b/configuration-ghc-902.nix similarity index 83% rename from configuration-ghc-901.nix rename to configuration-ghc-902.nix index 789a5d2e19..2c4e0909fc 100644 --- a/configuration-ghc-901.nix +++ b/configuration-ghc-902.nix @@ -1,4 +1,4 @@ -# nix version of cabal-ghc901.project +# nix version of cabal-ghc902.project { pkgs }: let @@ -12,9 +12,6 @@ let { hlsDisabledPlugins = disabledPlugins; - fourmolu = hself.fourmolu_0_4_0_0; - primitive-extras = hself.primitive-extras_0_10_1_2; - # Re-generate HLS drv excluding some plugins haskell-language-server = hself.callCabal2nixWithOptions "haskell-language-server" ./. diff --git a/flake.nix b/flake.nix index 45ae9177f2..30dafb4209 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-ghc92.project"; + haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; + haskell-language-server-922-dev = mkDevShell ghc922 "cabal-ghc92.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-ghc92.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 483e223ee1fcaed2cb70fc88868a633bdec74110 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 08:10:56 -0400 Subject: [PATCH 11/38] use ghc-exactprint 1.5.0 for ghc922 --- configuration-ghc-922.nix | 2 +- flake.lock | 13 +++++++++++++ flake.nix | 6 ++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/configuration-ghc-922.nix b/configuration-ghc-922.nix index fc0ee1ed0b..60d583e7f9 100644 --- a/configuration-ghc-922.nix +++ b/configuration-ghc-922.nix @@ -19,7 +19,7 @@ let hlsDisabledPlugins = disabledPlugins; fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {}; - ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint {}; + ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 {}; constraints-extras = hself.callCabal2nix "constraints-extras" inputs.constraints-extras {}; retrie = hself.callCabal2nix "retrie" inputs.retrie {}; 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 30dafb4209..08b0d527b7 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 0671a86031e4d10e9665ba937a6ec5a2a6d79327 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 09:15:35 -0400 Subject: [PATCH 12/38] ghc902: add flag hlint34 to nix --- configuration-ghc-902.nix | 23 ++++++++++++----------- flake.lock | 13 +++++++++++++ flake.nix | 6 +++++- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/configuration-ghc-902.nix b/configuration-ghc-902.nix index 2c4e0909fc..7eee93347a 100644 --- a/configuration-ghc-902.nix +++ b/configuration-ghc-902.nix @@ -1,24 +1,25 @@ # nix version of cabal-ghc902.project -{ pkgs }: +{ pkgs, inputs }: let - disabledPlugins = [ - "hls-brittany-plugin" - "hls-stylish-haskell-plugin" - ]; + disabledPlugins = [ "hls-brittany-plugin" "hls-stylish-haskell-plugin" ]; hpkgsOverride = hself: hsuper: - with pkgs.haskell.lib; - { + with pkgs.haskell.lib; { hlsDisabledPlugins = disabledPlugins; + # 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" ]) { }; + # Re-generate HLS drv excluding some plugins haskell-language-server = hself.callCabal2nixWithOptions "haskell-language-server" ./. - (pkgs.lib.concatStringsSep " " [ - "-f-brittany" - "-f-stylishhaskell" - ]) { }; + (pkgs.lib.concatStringsSep " " [ "-f-brittany" "-f-stylishhaskell" ]) + { }; # YOLO mkDerivation = args: 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 08b0d527b7..3c40e91952 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 58258bf019d245b31be08d12e79af473ce232d30 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 09:39:31 -0400 Subject: [PATCH 13/38] macosx: add SSE-enabled ptr-poker dependency --- configuration-ghc-902.nix | 4 ++++ configuration-ghc-922.nix | 19 ++++++++++++------- flake.nix | 4 ++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/configuration-ghc-902.nix b/configuration-ghc-902.nix index 7eee93347a..f00fbb5203 100644 --- a/configuration-ghc-902.nix +++ b/configuration-ghc-902.nix @@ -8,6 +8,10 @@ let with pkgs.haskell.lib; { hlsDisabledPlugins = disabledPlugins; + # 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 { }; + # Hlint is still broken hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { }); diff --git a/configuration-ghc-922.nix b/configuration-ghc-922.nix index 60d583e7f9..7e58eb73b3 100644 --- a/configuration-ghc-922.nix +++ b/configuration-ghc-922.nix @@ -14,17 +14,22 @@ let ]; hpkgsOverride = hself: hsuper: - with pkgs.haskell.lib; - { + with pkgs.haskell.lib; { hlsDisabledPlugins = disabledPlugins; - fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {}; - ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 {}; - constraints-extras = hself.callCabal2nix "constraints-extras" inputs.constraints-extras {}; - retrie = hself.callCabal2nix "retrie" inputs.retrie {}; + fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu { }; + ghc-exactprint = + hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { }; + constraints-extras = + hself.callCabal2nix "constraints-extras" inputs.constraints-extras { }; + retrie = hself.callCabal2nix "retrie" inputs.retrie { }; + + # 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 { }; # Hlint is still broken - hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint {}); + hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { }); # Re-generate HLS drv excluding some plugins haskell-language-server = diff --git a/flake.nix b/flake.nix index 3c40e91952..8ee7464267 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 a74875d0b027fba4084e73310e8e6e516b2948ac Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 09:46:36 -0400 Subject: [PATCH 14/38] ghc902 requires ghc-lib-parser >= 9.2 --- configuration-ghc-902.nix | 2 ++ flake.lock | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/configuration-ghc-902.nix b/configuration-ghc-902.nix index f00fbb5203..26fc2dce8a 100644 --- a/configuration-ghc-902.nix +++ b/configuration-ghc-902.nix @@ -12,6 +12,8 @@ let # https://github.com/nikita-volkov/ptr-poker/issues/11 ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { }; + ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307; + # Hlint is still broken hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { }); 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 9b8176de5091cecb4743559dc60cd820775487c6 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 10:38:16 -0400 Subject: [PATCH 15/38] nix: ghcDefault supports HLS tweaks --- flake.nix | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 8ee7464267..6de090b7df 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 2862ebb7a7e33b393833f9058234563737adf511 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:23:55 -0400 Subject: [PATCH 16/38] ghc902 requires Cabal-36 to build Ormolu --- configuration-ghc-902.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configuration-ghc-902.nix b/configuration-ghc-902.nix index 26fc2dce8a..ab69114c6d 100644 --- a/configuration-ghc-902.nix +++ b/configuration-ghc-902.nix @@ -13,6 +13,11 @@ let ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { }; 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 { }); From 5553277e6dc811bdad0a25e18f36bdf0650e37c5 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:30:54 -0400 Subject: [PATCH 17/38] flag ghc-lib for hls-hlint-plugin on ghc902 --- configuration-ghc-902.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configuration-ghc-902.nix b/configuration-ghc-902.nix index ab69114c6d..72e71522cf 100644 --- a/configuration-ghc-902.nix +++ b/configuration-ghc-902.nix @@ -12,6 +12,7 @@ let # 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; @@ -24,7 +25,7 @@ let hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin" ./plugins/hls-hlint-plugin - (pkgs.lib.concatStringsSep " " [ "-fhlint34" ]) { }; + (pkgs.lib.concatStringsSep " " [ "-fhlint34" "-fghc-lib" ]) { }; # Re-generate HLS drv excluding some plugins haskell-language-server = From dd1846851370ccb7288746ef0ecd37094c8150d9 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:38:56 -0400 Subject: [PATCH 18/38] fix typo --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6de090b7df..c4aaf86e3a 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 b868dd58ed155f2d9280e51fd9e04a2cfd5cd8d4 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:45:14 -0400 Subject: [PATCH 19/38] add support for pre-commit in mkDevShell --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index c4aaf86e3a..16c73d3b9e 100644 --- a/flake.nix +++ b/flake.nix @@ -306,6 +306,7 @@ capstone tracy # ormolu # stylish-haskell + pre-commit ]; From 8e2aed29eeed66b4a5f64efcc27a1ca8d7b4330e Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 11:53:37 -0400 Subject: [PATCH 20/38] fix typo --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 16c73d3b9e..71be433c54 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 f018e24fae3e9ef7e2ba4f1e8e6143888c6e34d5 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 12:10:16 -0400 Subject: [PATCH 21/38] add ptr-poker to nix shell --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 71be433c54..097f9e40b5 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 573bb665fcdb47380293128f38623e9c21c4598a Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 12:28:13 -0400 Subject: [PATCH 22/38] 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 097f9e40b5..f377d999ea 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 f1a519e05bd0baab436f2bf4efc0c03aeeeb53bf Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 12:50:23 -0400 Subject: [PATCH 23/38] 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 f377d999ea..3ab159e5d2 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 3e2fbfbaf8514fdaa176714525373f2ea9fd5480 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 13:14:39 -0400 Subject: [PATCH 24/38] fix default ghc lookup --- flake.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 3ab159e5d2..72022dafd1 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 b024b1d6eb2b6fb8d9c7b0c45e04899d53a616e1 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 13:20:30 -0400 Subject: [PATCH 25/38] 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 72022dafd1..120ead8b39 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 89cdb059ca6fd642aceffaa18f63c8414cafd326 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 13:22:38 -0400 Subject: [PATCH 26/38] 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 120ead8b39..befa715c56 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 f2a936a2e7577f4678c801fbd8a4eee4c78f896d Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 14:09:46 -0400 Subject: [PATCH 27/38] 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 befa715c56..2d47579e56 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 b0545b0ae94093949599acd0c5f50671cb0c6838 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:11:45 -0400 Subject: [PATCH 28/38] 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 2d47579e56..035cb10d6a 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 9d24aec645bf3bce639e5cd77407b045782c805b Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:16:10 -0400 Subject: [PATCH 29/38] rename configuration-ghc-xxx.nix files --- configuration-ghc-810.nix | 1 - configuration-ghc-88.nix | 1 - configuration-ghc-902.nix => configuration-ghc-90.nix | 1 - configuration-ghc-922.nix => configuration-ghc-92.nix | 1 - flake.nix | 4 ++-- 5 files changed, 2 insertions(+), 6 deletions(-) rename configuration-ghc-902.nix => configuration-ghc-90.nix (97%) rename configuration-ghc-922.nix => configuration-ghc-92.nix (97%) 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/configuration-ghc-902.nix b/configuration-ghc-90.nix similarity index 97% rename from configuration-ghc-902.nix rename to configuration-ghc-90.nix index 72e71522cf..bbf7eafbb1 100644 --- a/configuration-ghc-902.nix +++ b/configuration-ghc-90.nix @@ -1,4 +1,3 @@ -# nix version of cabal-ghc902.project { pkgs, inputs }: let diff --git a/configuration-ghc-922.nix b/configuration-ghc-92.nix similarity index 97% rename from configuration-ghc-922.nix rename to configuration-ghc-92.nix index 7e58eb73b3..b44e0fba67 100644 --- a/configuration-ghc-922.nix +++ b/configuration-ghc-92.nix @@ -1,4 +1,3 @@ -# nix version of cabal-ghc901.project { pkgs, inputs }: let diff --git a/flake.nix b/flake.nix index 035cb10d6a..dc91db19ba 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 b6105474c3cc4eaf5ae9d4d886bd978e7f256015 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:29:57 -0400 Subject: [PATCH 30/38] update hackage index --- cabal-ghc92.project | 2 +- cabal.project | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal-ghc92.project b/cabal-ghc92.project index 136ea7365b..f0d47d04cb 100644 --- a/cabal-ghc92.project +++ b/cabal-ghc92.project @@ -39,7 +39,7 @@ package * write-ghc-environment-files: never -index-state: 2022-04-27T09:22:49Z +index-state: 2022-04-30T21:02:45Z constraints: -- These plugins don't build/work on GHC92 yet diff --git a/cabal.project b/cabal.project index 70371297a7..3afb72dfac 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 9beb8323606f14f0003a2d885e1fa1b35b61b231 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 18:46:14 -0400 Subject: [PATCH 31/38] 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 dc91db19ba..023c8f7717 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 ca5e49b35c63e6a2b47a8760c88b2922c5cfb707 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 21:42:37 -0400 Subject: [PATCH 32/38] 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 12b10ebb9db943934546e7cb6dd42aab4fe86d28 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sat, 30 Apr 2022 21:45:18 -0400 Subject: [PATCH 33/38] fix hls-922-dev-nix ghc version --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 023c8f7717..ba822865b0 100644 --- a/flake.nix +++ b/flake.nix @@ -400,7 +400,7 @@ 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-ghc92.project"; + haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc922 "cabal-ghc92.project"; }; allPackages = { From 6c5e0097402d2b9a4c5e6ef0882207703ad775fc Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Sun, 1 May 2022 12:47:18 -0400 Subject: [PATCH 34/38] 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 d0b26fa2c7657a45c52d553cc0558941b7871c06 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 2 May 2022 05:39:45 -0400 Subject: [PATCH 35/38] 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 a04112438654b111bcc1a0a1598c7d0dfb8e4e01 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 2 May 2022 12:48:55 -0400 Subject: [PATCH 36/38] 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 ba822865b0..8410d144e4 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-ghc92.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 ghc922 "cabal-ghc92.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 0869af289e92943155cd3a1b42a23f41a6888745 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Mon, 2 May 2022 12:57:39 -0400 Subject: [PATCH 37/38] 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 e276dca3e3a2c37d6faed8a2fe5cebe46f74c609 Mon Sep 17 00:00:00 2001 From: Providence Salumu Date: Tue, 3 May 2022 03:28:13 -0400 Subject: [PATCH 38/38] 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 8410d144e4..ba822865b0 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-ghc92.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 ghc922 "cabal-ghc92.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; };