3
0
Fork 0
forked from mirrors/nixpkgs

(haskellPackages.callPackage foo).env: Set the right env vars when cross-compiling

This commit is contained in:
Shea Levy 2017-01-22 17:05:19 -05:00
parent 121b8d23af
commit 0ff6b6fc0f

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