From b71e603aa00cb477594fe137e1e0f693f3494f74 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Wed, 16 Oct 2024 08:24:19 +0900 Subject: [PATCH] Add GHC 9.10 (#162) * Add GHC 9.10 * Fix windows 910-windows Build cabal 3.10.3.0 with GHC-9.8 if necessary --------- Co-authored-by: Sean D Gillespie --- .github/workflows/hello.yml | 1 + .github/workflows/main.yml | 1 + cross-windows.nix | 18 ++++++++++++++++-- flake.nix | 4 +++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml index 59dc7e76..a1f73684 100644 --- a/.github/workflows/hello.yml +++ b/.github/workflows/hello.yml @@ -20,6 +20,7 @@ jobs: - ghc92 - ghc96 - ghc98 + - ghc910 target-platform: - "" - "-static" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14f55c0a..ccc420bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: - ghc92 - ghc96 - ghc98 + - ghc910 target-platform: - "" - "-static" diff --git a/cross-windows.nix b/cross-windows.nix index 4d226474..56432161 100644 --- a/cross-windows.nix +++ b/cross-windows.nix @@ -10,6 +10,13 @@ let tool-version-map = import ./tool-map.nix; zstdSupport = false; pslSupport = false; }); + # Haskell.nix pulls in cabal-install 3.10.3.0 which will not build with 9.10+. In that + # case, build with 9.8 + native-cabal-install = + if builtins.compareVersions compiler.version "9.10" >= 0 then + pkgs.pkgsBuildBuild.haskell-nix.cabal-install.ghc982 + else + pkgs.pkgsBuildBuild.haskell-nix.cabal-install.${compiler-nix-name}; inherit (pkgs.haskell-nix.iserv-proxy-exes.${compiler-nix-name}) iserv-proxy iserv-proxy-interpreter; dllPkgs = [ @@ -165,10 +172,17 @@ pkgs.pkgsBuildBuild.mkShell ({ '' + (quirks.hint flavor) + quirks.shellHook; buildInputs = []; - nativeBuildInputs = [ wrapped-ghc wrapped-hsc2hs wrapped-cabal wine-test-wrapper compiler ] ++ (with pkgs; [ + nativeBuildInputs = [ + wrapped-ghc + wrapped-hsc2hs + wrapped-cabal + wine-test-wrapper + compiler + native-cabal-install + ] + ++ (with pkgs; [ buildPackages.bintools.bintools stdenv.cc - pkgsBuildBuild.haskell-nix.cabal-install.${compiler-nix-name} (pkgsBuildBuild.pkg-config or pkgsBuildBuild.pkgconfig) (tool "happy") (tool "alex") diff --git a/flake.nix b/flake.nix index d349d022..cddf1bda 100644 --- a/flake.nix +++ b/flake.nix @@ -100,7 +100,8 @@ "ghc92" "ghc94" "ghc96" - "ghc98"] (short-name: rec { + "ghc98" + "ghc910"] (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}; @@ -110,6 +111,7 @@ "ghc90" "ghc92" "ghc94" + "ghc910" ]; windows-compilers = pkgs: pkgs.lib.optionalAttrs (__elem system ["x86_64-linux"])