ghc with-packages-wrapper: Add support for cross-compiling
This commit is contained in:
parent
4008370992
commit
a798850675
@ -32,8 +32,10 @@ let
|
|||||||
isGhcjs = ghc.isGhcjs or false;
|
isGhcjs = ghc.isGhcjs or false;
|
||||||
ghc761OrLater = isGhcjs || lib.versionOlder "7.6.1" ghc.version;
|
ghc761OrLater = isGhcjs || lib.versionOlder "7.6.1" ghc.version;
|
||||||
packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
|
packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
|
||||||
ghcCommand = if isGhcjs then "ghcjs" else "ghc";
|
ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
|
||||||
ghcCommandCaps= lib.toUpper ghcCommand;
|
crossPrefix = if (ghc.cross or null) != null then "${ghc.cross.config}-" else "";
|
||||||
|
ghcCommand = "${crossPrefix}${ghcCommand'}";
|
||||||
|
ghcCommandCaps= lib.toUpper ghcCommand';
|
||||||
libDir = "$out/lib/${ghcCommand}-${ghc.version}";
|
libDir = "$out/lib/${ghcCommand}-${ghc.version}";
|
||||||
docDir = "$out/share/doc/ghc/html";
|
docDir = "$out/share/doc/ghc/html";
|
||||||
packageCfgDir = "${libDir}/package.conf.d";
|
packageCfgDir = "${libDir}/package.conf.d";
|
||||||
|
Loading…
Reference in New Issue
Block a user