Skip to content

Commit

Permalink
Add GHC 9.10 (#162)
Browse files Browse the repository at this point in the history
* 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 <sean.gillespie@iohk.io>
  • Loading branch information
angerman and sgillespie authored Oct 15, 2024
1 parent 4880162 commit b71e603
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/hello.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- ghc92
- ghc96
- ghc98
- ghc910
target-platform:
- ""
- "-static"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- ghc92
- ghc96
- ghc98
- ghc910
target-platform:
- ""
- "-static"
Expand Down
18 changes: 16 additions & 2 deletions cross-windows.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -110,6 +111,7 @@
"ghc90"
"ghc92"
"ghc94"
"ghc910"
];
windows-compilers = pkgs:
pkgs.lib.optionalAttrs (__elem system ["x86_64-linux"])
Expand Down

0 comments on commit b71e603

Please sign in to comment.