3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #22057 from shlevy/haskell-modules-cross-env

(haskellPackages.callPackage foo).env: Set the right env vars when cross-compiling
This commit is contained in:
Peter Simons 2017-01-23 14:30:58 +01:00 committed by GitHub
commit 24fed4d344

View file

@ -148,8 +148,10 @@ let
setupBuilder = if isCross || isGhcjs then "${nativeGhc}/bin/ghc" else ghcCommand;
setupCommand = "./Setup";
ghcCommand = if isGhcjs then "ghcjs" else if isCross then "${ghc.cross.config}-ghc" else "ghc";
ghcCommandCaps = toUpper ghcCommand;
ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
crossPrefix = if (ghc.cross or null) != null then "${ghc.cross.config}-" else "";
ghcCommand = "${crossPrefix}${ghcCommand'}";
ghcCommandCaps= lib.toUpper ghcCommand';
in