From 71da5011bc3a0f539061261af81cff98997aafa5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 18 Mar 2025 14:54:18 +1300 Subject: [PATCH 1/6] Add GHC 9.12 and remove 9.0, 9.2 and 9.4 --- .github/workflows/hello.yml | 4 +-- flake.lock | 71 +++++++++++++++++++++++-------------- flake.nix | 6 ++-- 3 files changed, 47 insertions(+), 34 deletions(-) diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml index d20cee1..1cb657c 100644 --- a/.github/workflows/hello.yml +++ b/.github/workflows/hello.yml @@ -18,10 +18,10 @@ jobs: #- aarch64-linux compiler-nix-name: - ghc810 - - ghc92 - ghc96 - ghc98 - ghc910 + - ghc912 target-platform: - "" - "-static" @@ -37,8 +37,6 @@ jobs: # Just cross compiling javascript with ghc 9.6 for now - compiler-nix-name: ghc810 target-platform: "-js" - - compiler-nix-name: ghc92 - target-platform: "-js" # Static builds not working for darwin yet - platform: x86_64-darwin target-platform: "-static" diff --git a/flake.lock b/flake.lock index 0618584..b072098 100644 --- a/flake.lock +++ b/flake.lock @@ -36,11 +36,11 @@ "cabal": { "flake": false, "locked": { - "lastModified": 1740376902, - "narHash": "sha256-KUKGEVPL0qAyOHzPTSqet7ajkNw/bpXnKieR9mAmRGk=", + "lastModified": 1741843135, + "narHash": "sha256-yILTMjVROPHtzqZVUOjpZ/o8VZdWoQ0pcZlwpkDsMWA=", "owner": "stable-haskell", "repo": "cabal", - "rev": "98242d4d81e38dd591e212f3a9df7f04215ad1c7", + "rev": "e68e2398a0cca8af9d592d406eda8bceb51d5394", "type": "github" }, "original": { @@ -172,11 +172,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1740443059, - "narHash": "sha256-mM5GHiCNA5cwOC+zpRuNq/lmdFJ+mBUMH/bxlazwYDw=", + "lastModified": 1742257475, + "narHash": "sha256-6P9Ky9YK9e3RO/fkzY4cAuVfRkdwiLKe5G5u64gOLYQ=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "79e170956b8e805c53666e3cde7198cba9a7268d", + "rev": "010ce4ab9b6cc545811d7bbabe2a94ec3f9bad40", "type": "github" }, "original": { @@ -188,11 +188,11 @@ "hackage-for-stackage": { "flake": false, "locked": { - "lastModified": 1740443047, - "narHash": "sha256-SGAnmukMJPksY5KQcL2gOzJ9utxhaEGUQQgyc12Agaw=", + "lastModified": 1742257465, + "narHash": "sha256-+TFf3A0YGCp84ySQtOyf7NnFUhygbYDg+xrZDw/OQ8g=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "e379651b3605952d1ec5930c79b848eec20cf715", + "rev": "d64feaae2cc7d84e3886fdb0901986606f9aa2a2", "type": "github" }, "original": { @@ -213,6 +213,7 @@ "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", "hackage-for-stackage": "hackage-for-stackage", + "hls": "hls", "hls-1.10": "hls-1.10", "hls-2.0": "hls-2.0", "hls-2.2": "hls-2.2", @@ -238,11 +239,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1740444702, - "narHash": "sha256-uqfpsjuX+nnbXpSy4YmzgTJGFY3ivY60IpJc68YQa2Y=", + "lastModified": 1742259110, + "narHash": "sha256-HywkFnFtiujE9HfU2yZfjsT1+nGmsKLUJGW03kR7mow=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "e843d27716ac021992e6495751b4bfa2654cc197", + "rev": "605a567596c1572a9b4488741a86ba16584d3052", "type": "github" }, "original": { @@ -251,6 +252,22 @@ "type": "github" } }, + "hls": { + "flake": false, + "locked": { + "lastModified": 1741604408, + "narHash": "sha256-tuq3+Ip70yu89GswZ7DSINBpwRprnWnl6xDYnS4GOsc=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "682d6894c94087da5e566771f25311c47e145359", + "type": "github" + }, + "original": { + "owner": "haskell", + "repo": "haskell-language-server", + "type": "github" + } + }, "hls-1.10": { "flake": false, "locked": { @@ -407,11 +424,11 @@ "hls-2.9": { "flake": false, "locked": { - "lastModified": 1720003792, - "narHash": "sha256-qnDx8Pk0UxtoPr7BimEsAZh9g2WuTuMB/kGqnmdryKs=", + "lastModified": 1719993701, + "narHash": "sha256-wy348++MiMm/xwtI9M3vVpqj2qfGgnDcZIGXw8sF1sA=", "owner": "haskell", "repo": "haskell-language-server", - "rev": "0c1817cb2babef0765e4e72dd297c013e8e3d12b", + "rev": "90319a7e62ab93ab65a95f8f2bcf537e34dae76a", "type": "github" }, "original": { @@ -445,11 +462,11 @@ "sodium": "sodium" }, "locked": { - "lastModified": 1738874249, - "narHash": "sha256-oyPD/zIhs5AUEdYXZHluMAOmT5ynJSgjV2bNIXt5aKE=", + "lastModified": 1740527380, + "narHash": "sha256-0sF0RUsnFVdRMoS9amtRQs6TnCFynDFdbzn8zBLD5Bg=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "e26038d47df5d17187288fd7c8f5b915c9447b2e", + "rev": "ea26f2ca1686656d89bb5760f717f713168cd5a5", "type": "github" }, "original": { @@ -461,11 +478,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1717479972, - "narHash": "sha256-7vE3RQycHI1YT9LHJ1/fUaeln2vIpYm6Mmn8FTpYeVo=", + "lastModified": 1742121966, + "narHash": "sha256-x4bg4OoKAPnayom0nWc0BmlxgRMMHk6lEPvbiyFBq1s=", "owner": "stable-haskell", "repo": "iserv-proxy", - "rev": "2ed34002247213fc435d0062350b91bab920626e", + "rev": "e9dc86ed6ad71f0368c16672081c8f26406c3a7e", "type": "github" }, "original": { @@ -541,11 +558,11 @@ }, "nixpkgs-2411": { "locked": { - "lastModified": 1737255904, - "narHash": "sha256-r3fxHvh+M/mBgCZXOACzRFPsJdix2QSsKazb7VCXXo0=", + "lastModified": 1739151041, + "narHash": "sha256-uNszcul7y++oBiyYXjHEDw/AHeLNp8B6pyWOB+RLA/4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "eacdab35066b0bb1c9413c96898e326b76398a81", + "rev": "94792ab2a6beaec81424445bf917ca2556fbeade", "type": "github" }, "original": { @@ -637,11 +654,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1740442299, - "narHash": "sha256-FuJ69LY9JSioFN2oEHSAeintvIiI44EH5KuZKB/9q54=", + "lastModified": 1742256713, + "narHash": "sha256-uOcYxLNixdsZivcz9hhOlVWO7nogwIFsWJxlRvDSgyk=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "837f90c84db66ba8edd1e3598f95c1ad55de92aa", + "rev": "27c2471ebf3c5b77ee2f817a51a31c4ee5ef9a82", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fa25ea8..e422c90 100644 --- a/flake.nix +++ b/flake.nix @@ -89,12 +89,10 @@ # projects do (that way we can use short names) let compilers = pkgs: pkgs.lib.genAttrs [ "ghc810" - "ghc90" - "ghc92" - "ghc94" "ghc96" "ghc98" - "ghc910"] (short-name: rec { + "ghc910" + "ghc912"] (short-name: rec { inherit pkgs self toolsModule; compiler-nix-name = pkgs.haskell-nix.resolve-compiler-name short-name; compiler = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name}; From e7eb38a0169a9550df46d5ab17411cc09887e130 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 18 Mar 2025 15:55:33 +1300 Subject: [PATCH 2/6] Fix building cabal with GHC 9.12 --- tool-map.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tool-map.nix b/tool-map.nix index ae0729e..d280757 100644 --- a/tool-map.nix +++ b/tool-map.nix @@ -55,5 +55,8 @@ compiler-nix-name: tool: { # cabal = { src = { outPath = self.inputs.cabal; filterPath = { path, ... }: path; }; } # cabalProjectFileName = "cabal.bootstrap.project"; + cabalProjectLocal = '' + index-state: hackage.haskell.org 2025-03-17T00:00:00Z + ''; }; }.${tool} or fixed-versions.${tool}.${compiler-nix-name} or {} From 55d15eaf5ab266e5b5a99d81c76a23f1f1c3ccef Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 19 Mar 2025 21:07:47 +1300 Subject: [PATCH 3/6] Update comment to trigger build --- .github/workflows/hello.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml index 1cb657c..c54c648 100644 --- a/.github/workflows/hello.yml +++ b/.github/workflows/hello.yml @@ -34,7 +34,7 @@ jobs: - false - true exclude: - # Just cross compiling javascript with ghc 9.6 for now + # Just cross compiling javascript with ghc 9.6 and above - compiler-nix-name: ghc810 target-platform: "-js" # Static builds not working for darwin yet From 139062ae940519eaf549f4d734eb17dad048a394 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 4 Apr 2025 11:27:32 +1300 Subject: [PATCH 4/6] nix flake update Should bring in ghc 9.6.7 --- flake.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index b072098..0b3240e 100644 --- a/flake.lock +++ b/flake.lock @@ -19,16 +19,16 @@ "blst": { "flake": false, "locked": { - "lastModified": 1691598027, - "narHash": "sha256-oqljy+ZXJAXEB/fJtmB8rlAr4UXM+Z2OkDa20gpILNA=", + "lastModified": 1739372843, + "narHash": "sha256-IlbNMLBjs/dvGogcdbWQIL+3qwy7EXJbIDpo4xBd4bY=", "owner": "supranational", "repo": "blst", - "rev": "3dd0f804b1819e5d03fb22ca2e6fac105932043a", + "rev": "8c7db7fe8d2ce6e76dc398ebd4d475c0ec564355", "type": "github" }, "original": { "owner": "supranational", - "ref": "v0.3.11", + "ref": "v0.3.14", "repo": "blst", "type": "github" } @@ -36,11 +36,11 @@ "cabal": { "flake": false, "locked": { - "lastModified": 1741843135, - "narHash": "sha256-yILTMjVROPHtzqZVUOjpZ/o8VZdWoQ0pcZlwpkDsMWA=", + "lastModified": 1742274496, + "narHash": "sha256-FJotImCQxXPIQrhbMK33CeuOauLzKoTO2KvFHNtRo+g=", "owner": "stable-haskell", "repo": "cabal", - "rev": "e68e2398a0cca8af9d592d406eda8bceb51d5394", + "rev": "9b66d2cb6229e5864ef1d1c1ffee59bb2d8d9780", "type": "github" }, "original": { @@ -172,11 +172,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1742257475, - "narHash": "sha256-6P9Ky9YK9e3RO/fkzY4cAuVfRkdwiLKe5G5u64gOLYQ=", + "lastModified": 1743639872, + "narHash": "sha256-0zfGLG1XEM3PTH+RIcd7honW0aUvjX2XxAFnjLrsFMg=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "010ce4ab9b6cc545811d7bbabe2a94ec3f9bad40", + "rev": "67cab671223badd966c7c481c6504a594dba0cb2", "type": "github" }, "original": { @@ -188,11 +188,11 @@ "hackage-for-stackage": { "flake": false, "locked": { - "lastModified": 1742257465, - "narHash": "sha256-+TFf3A0YGCp84ySQtOyf7NnFUhygbYDg+xrZDw/OQ8g=", + "lastModified": 1743639862, + "narHash": "sha256-/8gnbtlgJ4mO0c8GGOdaiKg7nQF1NqFQUAt6d+pBpMI=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "d64feaae2cc7d84e3886fdb0901986606f9aa2a2", + "rev": "6857f977e2167e0b75b6f56c50347fa234a67e94", "type": "github" }, "original": { @@ -239,11 +239,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1742259110, - "narHash": "sha256-HywkFnFtiujE9HfU2yZfjsT1+nGmsKLUJGW03kR7mow=", + "lastModified": 1743716525, + "narHash": "sha256-WTOlndN8MVmRuOpAQqmL/xAljJ26sCnKllPk6r78ZXE=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "605a567596c1572a9b4488741a86ba16584d3052", + "rev": "3d419f59540968b86177842c60bad3200b1ca9e4", "type": "github" }, "original": { @@ -462,11 +462,11 @@ "sodium": "sodium" }, "locked": { - "lastModified": 1740527380, - "narHash": "sha256-0sF0RUsnFVdRMoS9amtRQs6TnCFynDFdbzn8zBLD5Bg=", + "lastModified": 1743649718, + "narHash": "sha256-Wl1nQ2dak4b3fXA7+9rB2ntiKUS+yAzR2kOIUoAF0u8=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "ea26f2ca1686656d89bb5760f717f713168cd5a5", + "rev": "3acad181ea6619b64fa49961133026110a460945", "type": "github" }, "original": { @@ -654,11 +654,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1742256713, - "narHash": "sha256-uOcYxLNixdsZivcz9hhOlVWO7nogwIFsWJxlRvDSgyk=", + "lastModified": 1743639115, + "narHash": "sha256-GxvjgPPK4zAqGZMoU0czAQ8KlIv8Dycy8pF4J9BRsS8=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "27c2471ebf3c5b77ee2f817a51a31c4ee5ef9a82", + "rev": "49e2a451252a8036be213342ab9e4379499f1fed", "type": "github" }, "original": { From a5d7998463c91d6c06a7814a0e008bcc348dca9d Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 4 Apr 2025 22:09:54 +1300 Subject: [PATCH 5/6] Use HLS 2.10 --- flake.lock | 42 ++++++++++++++++++++++++++++++------------ tool-map.nix | 2 +- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 0b3240e..54cb9b2 100644 --- a/flake.lock +++ b/flake.lock @@ -172,11 +172,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1743639872, - "narHash": "sha256-0zfGLG1XEM3PTH+RIcd7honW0aUvjX2XxAFnjLrsFMg=", + "lastModified": 1743726306, + "narHash": "sha256-47ILvNh/RSQP6PQ9TkuiqSdxLbOEuAlQZVQrHdj8dwU=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "67cab671223badd966c7c481c6504a594dba0cb2", + "rev": "9f3c25c7eb211f558744d7d4e8ef0a41265eda45", "type": "github" }, "original": { @@ -188,11 +188,11 @@ "hackage-for-stackage": { "flake": false, "locked": { - "lastModified": 1743639862, - "narHash": "sha256-/8gnbtlgJ4mO0c8GGOdaiKg7nQF1NqFQUAt6d+pBpMI=", + "lastModified": 1743726296, + "narHash": "sha256-E8ABsEHk0zPyy5tRH01VYN0XgHRKWLSukJMrTtie6Lw=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "6857f977e2167e0b75b6f56c50347fa234a67e94", + "rev": "fdd3d2bb06fb0b798820126537ca0933f132c535", "type": "github" }, "original": { @@ -216,6 +216,7 @@ "hls": "hls", "hls-1.10": "hls-1.10", "hls-2.0": "hls-2.0", + "hls-2.10": "hls-2.10", "hls-2.2": "hls-2.2", "hls-2.3": "hls-2.3", "hls-2.4": "hls-2.4", @@ -239,11 +240,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1743716525, - "narHash": "sha256-WTOlndN8MVmRuOpAQqmL/xAljJ26sCnKllPk6r78ZXE=", + "lastModified": 1743757633, + "narHash": "sha256-WfGGRcl0P0Xf7G0lJKLNEcIDbGPktqo8/fY7lDCGwFo=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "3d419f59540968b86177842c60bad3200b1ca9e4", + "rev": "835d1d863e8a885a644cb8529c1fa391eb5f14a3", "type": "github" }, "original": { @@ -302,6 +303,23 @@ "type": "github" } }, + "hls-2.10": { + "flake": false, + "locked": { + "lastModified": 1743069404, + "narHash": "sha256-q4kDFyJDDeoGqfEtrZRx4iqMVEC2MOzCToWsFY+TOzY=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "2318c61db3a01e03700bd4b05665662929b7fe8b", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.10.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hls-2.2": { "flake": false, "locked": { @@ -654,11 +672,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1743639115, - "narHash": "sha256-GxvjgPPK4zAqGZMoU0czAQ8KlIv8Dycy8pF4J9BRsS8=", + "lastModified": 1743725527, + "narHash": "sha256-kjR/FLAg7bVMI8h40QWSV8mQRSdTUesMG3ITYbcAlKM=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "49e2a451252a8036be213342ab9e4379499f1fed", + "rev": "b7d2fd63e4b3b1a2633f61248b06bb5ecf08fd71", "type": "github" }, "original": { diff --git a/tool-map.nix b/tool-map.nix index d280757..9993e1f 100644 --- a/tool-map.nix +++ b/tool-map.nix @@ -37,7 +37,7 @@ compiler-nix-name: tool: { # Use the github source of HLS that is tested with haskell.nix CI src = { "ghc8107" = pkgs.haskell-nix.sources."hls-2.2"; "ghc902" = pkgs.haskell-nix.sources."hls-2.4"; - }.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.9"; + }.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.10"; # `tool` normally ignores the `cabal.project` (if there is one in the hackage source). # We need to use the github one (since it has settings to make hls build). cabalProject = __readFile (src + "/cabal.project"); From 02963c3279b0baf7cca154dcb068467ce3063494 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 5 Apr 2025 13:43:38 +1300 Subject: [PATCH 6/6] Fixes for hlint and hls --- cross-js.nix | 5 ++--- cross-windows.nix | 4 ++-- dynamic.nix | 4 ++-- static.nix | 4 ++-- tool-map.nix | 6 ++++++ 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/cross-js.nix b/cross-js.nix index 3472427..586b244 100644 --- a/cross-js.nix +++ b/cross-js.nix @@ -4,11 +4,10 @@ let tool-version-map = (import ./tool-map.nix) self; cabal-install = tool "cabal"; haskell-tools = pkgs.lib.optionalAttrs (withHLS && (compiler-not-in ( - # it appears we can't get HLS build with 9.8 yet. - pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; } // pkgs.lib.optionalAttrs (withHlint && (compiler-not-in ( - pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; }; # add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler. compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true); diff --git a/cross-windows.nix b/cross-windows.nix index 58c2440..64a243e 100644 --- a/cross-windows.nix +++ b/cross-windows.nix @@ -5,10 +5,10 @@ let tool-version-map = (import ./tool-map.nix) self; haskell-tools = pkgs.lib.optionalAttrs (withHLS && (compiler-not-in ( # it appears we can't get HLS build with 9.8 yet. - pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; } // pkgs.lib.optionalAttrs (withHlint && (compiler-not-in ( - pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; }; # add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler. compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true); diff --git a/dynamic.nix b/dynamic.nix index edadad9..e1d9316 100644 --- a/dynamic.nix +++ b/dynamic.nix @@ -5,10 +5,10 @@ let tool-version-map = (import ./tool-map.nix) self; cabal-install = tool "cabal"; haskell-tools = pkgs.lib.optionalAttrs (withHLS && (compiler-not-in ( - pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; } // pkgs.lib.optionalAttrs (withHlint && (compiler-not-in ( - pkgs.lib.optional (builtins.compareVersions compiler.version "9.10" >= 0) compiler-nix-name + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; }; # add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler. compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true); diff --git a/static.nix b/static.nix index a317185..f2d55b8 100644 --- a/static.nix +++ b/static.nix @@ -4,9 +4,9 @@ let tool-version-map = (import ./tool-map.nix) self; cabal-install = tool "cabal"; haskell-tools = pkgs.lib.optionalAttrs (withHLS && (compiler-not-in ( - pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name) "Haskell Language Server")) { hls = tool "haskell-language-server"; } + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name) "Haskell Language Server")) { hls = tool "haskell-language-server"; } // pkgs.lib.optionalAttrs (withHlint && (compiler-not-in ( - pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name) "HLint")) { hlint = tool "hlint"; }; + pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name) "HLint")) { hlint = tool "hlint"; }; # add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler. compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true); diff --git a/tool-map.nix b/tool-map.nix index 9993e1f..bc5fe54 100644 --- a/tool-map.nix +++ b/tool-map.nix @@ -59,4 +59,10 @@ compiler-nix-name: tool: { index-state: hackage.haskell.org 2025-03-17T00:00:00Z ''; }; + hlint = { + cabalProjectLocal = '' + if impl(ghc ==9.8.4) + constraints: ghc-lib-parser <9.12.2 + ''; + }; }.${tool} or fixed-versions.${tool}.${compiler-nix-name} or {}