Skip to content

Commit 2eec6c1

Browse files
committed
Fix for GHC HEAD
1 parent 15d240f commit 2eec6c1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/ghc/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,12 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
489489
export STRIP="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
490490
export NIX_CFLAGS_COMPILE_FOR_BUILD+=" -I${lib.getDev libffi}/include -L${lib.getLib libffi}/lib"
491491
export NIX_CFLAGS_COMPILE_FOR_TARGET+=" -I${lib.getDev targetLibffi}/include -L${lib.getLib targetLibffi}/lib"
492-
substituteInPlace compiler/GHC.hs --replace-fail "panic \"corrupted wasi-sdk installation\"" "pure \"${targetPackages.wasilibc}\""
492+
${if ghc-version == "9.12.2"
493+
then ''
494+
substituteInPlace compiler/GHC.hs --replace-fail "panic \"corrupted wasi-sdk installation\"" "pure \"${targetPackages.wasilibc}\""
495+
'' else ''
496+
substituteInPlace compiler/GHC.hs --replace-fail "last <\$> Loader.getGccSearchDirectory logger dflags \"libraries\"" "pure \"${targetPackages.wasilibc}\""
497+
''}
493498
''
494499
# GHC is a bit confused on its cross terminology, as these would normally be
495500
# the *host* tools.

0 commit comments

Comments
 (0)