From 592578b38e656b2465c432dd7fc79d31528ecc70 Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Tue, 15 Oct 2024 16:07:14 -0400 Subject: [PATCH] Fix windows 910-windows Build cabal 3.10.3.0 with GHC-9.8 if necessary --- cross-windows.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/cross-windows.nix b/cross-windows.nix index 4d22647..5643216 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")