diff options
author | Peter Simons <simons@cryp.to> | 2015-03-29 11:02:31 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-03-29 11:02:31 +0200 |
commit | 028779fb401cce8f087a41a929b97441b96ac356 (patch) | |
tree | 946c38961c11f287db97bc93b907909ea38c2261 /pkgs/development/haskell-modules/with-packages-wrapper.nix | |
parent | 9718561589dd41aa28c4bef1476c60ad78e881c2 (diff) | |
download | nixlib-028779fb401cce8f087a41a929b97441b96ac356.tar nixlib-028779fb401cce8f087a41a929b97441b96ac356.tar.gz nixlib-028779fb401cce8f087a41a929b97441b96ac356.tar.bz2 nixlib-028779fb401cce8f087a41a929b97441b96ac356.tar.lz nixlib-028779fb401cce8f087a41a929b97441b96ac356.tar.xz nixlib-028779fb401cce8f087a41a929b97441b96ac356.tar.zst nixlib-028779fb401cce8f087a41a929b97441b96ac356.zip |
ghcWithPackages: fix isGhcjs evaluation even some more
This is harder than I would have thought.
Diffstat (limited to 'pkgs/development/haskell-modules/with-packages-wrapper.nix')
-rw-r--r-- | pkgs/development/haskell-modules/with-packages-wrapper.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index be708e7da577..be3e2e22a131 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -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}/ ''} |