mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
ghcWithPackages: fix isGhcjs evaluation even some more
This is harder than I would have thought.
This commit is contained in:
parent
9718561589
commit
028779fb40
1 changed files with 4 additions and 3 deletions
|
@ -29,9 +29,10 @@ assert versionOlder "6.12" ghc.version;
|
|||
# fi
|
||||
|
||||
let
|
||||
ghc761OrLater = ghc.isGhcjs || versionOlder "7.6.1" ghc.version;
|
||||
isGhcjs = ghc.isGhcjs or false;
|
||||
ghc761OrLater = isGhcjs || versionOlder "7.6.1" ghc.version;
|
||||
packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
|
||||
ghcCommand = if ghc.isGhcjs then "ghcjs" else "ghc";
|
||||
ghcCommand = if isGhcjs then "ghcjs" else "ghc";
|
||||
libDir = "$out/lib/${ghcCommand}-${ghc.version}";
|
||||
docDir = "$out/share/doc/ghc/html";
|
||||
packageCfgDir = "${libDir}/package.conf.d";
|
||||
|
@ -51,7 +52,7 @@ buildEnv {
|
|||
postBuild = ''
|
||||
. ${makeWrapper}/nix-support/setup-hook
|
||||
|
||||
${optionalString (ghc.isGhcjs or false) ''
|
||||
${optionalString isGhcjs ''
|
||||
cp -r "${ghc}/${ghc.libDir}/"* ${libDir}/
|
||||
''}
|
||||
|
||||
|
|
Loading…
Reference in a new issue