diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml index d20cee1..c54c648 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" @@ -34,11 +34,9 @@ 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" - - compiler-nix-name: ghc92 - target-platform: "-js" # Static builds not working for darwin yet - platform: x86_64-darwin target-platform: "-static" 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/flake.lock b/flake.lock index 0618584..54cb9b2 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": 1740376902, - "narHash": "sha256-KUKGEVPL0qAyOHzPTSqet7ajkNw/bpXnKieR9mAmRGk=", + "lastModified": 1742274496, + "narHash": "sha256-FJotImCQxXPIQrhbMK33CeuOauLzKoTO2KvFHNtRo+g=", "owner": "stable-haskell", "repo": "cabal", - "rev": "98242d4d81e38dd591e212f3a9df7f04215ad1c7", + "rev": "9b66d2cb6229e5864ef1d1c1ffee59bb2d8d9780", "type": "github" }, "original": { @@ -172,11 +172,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1740443059, - "narHash": "sha256-mM5GHiCNA5cwOC+zpRuNq/lmdFJ+mBUMH/bxlazwYDw=", + "lastModified": 1743726306, + "narHash": "sha256-47ILvNh/RSQP6PQ9TkuiqSdxLbOEuAlQZVQrHdj8dwU=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "79e170956b8e805c53666e3cde7198cba9a7268d", + "rev": "9f3c25c7eb211f558744d7d4e8ef0a41265eda45", "type": "github" }, "original": { @@ -188,11 +188,11 @@ "hackage-for-stackage": { "flake": false, "locked": { - "lastModified": 1740443047, - "narHash": "sha256-SGAnmukMJPksY5KQcL2gOzJ9utxhaEGUQQgyc12Agaw=", + "lastModified": 1743726296, + "narHash": "sha256-E8ABsEHk0zPyy5tRH01VYN0XgHRKWLSukJMrTtie6Lw=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "e379651b3605952d1ec5930c79b848eec20cf715", + "rev": "fdd3d2bb06fb0b798820126537ca0933f132c535", "type": "github" }, "original": { @@ -213,8 +213,10 @@ "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.10": "hls-2.10", "hls-2.2": "hls-2.2", "hls-2.3": "hls-2.3", "hls-2.4": "hls-2.4", @@ -238,11 +240,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1740444702, - "narHash": "sha256-uqfpsjuX+nnbXpSy4YmzgTJGFY3ivY60IpJc68YQa2Y=", + "lastModified": 1743757633, + "narHash": "sha256-WfGGRcl0P0Xf7G0lJKLNEcIDbGPktqo8/fY7lDCGwFo=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "e843d27716ac021992e6495751b4bfa2654cc197", + "rev": "835d1d863e8a885a644cb8529c1fa391eb5f14a3", "type": "github" }, "original": { @@ -251,6 +253,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": { @@ -285,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": { @@ -407,11 +442,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 +480,11 @@ "sodium": "sodium" }, "locked": { - "lastModified": 1738874249, - "narHash": "sha256-oyPD/zIhs5AUEdYXZHluMAOmT5ynJSgjV2bNIXt5aKE=", + "lastModified": 1743649718, + "narHash": "sha256-Wl1nQ2dak4b3fXA7+9rB2ntiKUS+yAzR2kOIUoAF0u8=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "e26038d47df5d17187288fd7c8f5b915c9447b2e", + "rev": "3acad181ea6619b64fa49961133026110a460945", "type": "github" }, "original": { @@ -461,11 +496,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 +576,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 +672,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1740442299, - "narHash": "sha256-FuJ69LY9JSioFN2oEHSAeintvIiI44EH5KuZKB/9q54=", + "lastModified": 1743725527, + "narHash": "sha256-kjR/FLAg7bVMI8h40QWSV8mQRSdTUesMG3ITYbcAlKM=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "837f90c84db66ba8edd1e3598f95c1ad55de92aa", + "rev": "b7d2fd63e4b3b1a2633f61248b06bb5ecf08fd71", "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}; 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 ae0729e..bc5fe54 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"); @@ -55,5 +55,14 @@ 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 + ''; + }; + hlint = { + cabalProjectLocal = '' + if impl(ghc ==9.8.4) + constraints: ghc-lib-parser <9.12.2 + ''; }; }.${tool} or fixed-versions.${tool}.${compiler-nix-name} or {}