on iko/ghcjs-patch-master help sign in
Add --with-compiler to shellFor cabal cross compile wrapper (#1078)
commit4245567cb1dcc7048909801c541ecc17d7e67fe7 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateFri 19 Mar 2021, 17:50 (6 years ago) parent1abbd16
1 file changed+2
builder/shell-for.nix+2
builder/shell-for.nix+2
@@ -128,10 +128,12 @@ in
128128 ++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools)
129129 # If this shell is a cross compilation shell include
130130 # wrapper script for running cabal build with appropriate args.
131+ # Includes `--with-compiler` in case the `cabal.project` file has `with-compiler:` in it.
131132 ++ lib.optional (ghcEnv.targetPrefix != "") (
132133 buildPackages.writeShellScriptBin "${ghcEnv.targetPrefix}cabal" ''
133134 exec cabal \
134135 --with-ghc=${ghcEnv.targetPrefix}ghc \
136+ --with-compiler=${ghcEnv.targetPrefix}ghc \
135137 --with-ghc-pkg=${ghcEnv.targetPrefix}ghc-pkg \
136138 --with-hsc2hs=${ghcEnv.targetPrefix}hsc2hs \
137139 ${lib.optionalString (ghcEnv.targetPrefix == "js-unknown-ghcjs-") ''