diff options
author | Charles Strahan <charles.c.strahan@gmail.com> | 2015-05-08 11:53:28 -0400 |
---|---|---|
committer | Charles Strahan <charles.c.strahan@gmail.com> | 2015-05-08 11:53:28 -0400 |
commit | 31dde168810c7dbb241c4be9502aa22eefe03f8a (patch) | |
tree | 515b61d16b66df67b240920099a7bf1cd011dd54 | |
parent | 929dc4199a57b5d21eb72077f735eb33c4c7b09b (diff) | |
download | nixpkgs-31dde168810c7dbb241c4be9502aa22eefe03f8a.tar nixpkgs-31dde168810c7dbb241c4be9502aa22eefe03f8a.tar.gz nixpkgs-31dde168810c7dbb241c4be9502aa22eefe03f8a.tar.bz2 nixpkgs-31dde168810c7dbb241c4be9502aa22eefe03f8a.tar.lz nixpkgs-31dde168810c7dbb241c4be9502aa22eefe03f8a.tar.xz nixpkgs-31dde168810c7dbb241c4be9502aa22eefe03f8a.tar.zst nixpkgs-31dde168810c7dbb241c4be9502aa22eefe03f8a.zip |
ghcjs: set NIX_GHCJS_* variables in env.
-rw-r--r-- | pkgs/development/haskell-modules/generic-builder.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 28fcf45bfa2..d441b824842 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -51,7 +51,7 @@ assert editedCabalFile != null -> revision != null; let inherit (stdenv.lib) optional optionals optionalString versionOlder - concatStringsSep enableFeature optionalAttrs; + concatStringsSep enableFeature optionalAttrs toUpper; isGhcjs = ghc.isGhcjs or false; @@ -116,6 +116,7 @@ let setupCommand = if isGhcjs then "${ghc.nodejs}/bin/node ./Setup.jsexe/all.js" else "./Setup"; ghcCommand = if isGhcjs then "ghcjs" else "ghc"; + ghcCommandCaps = toUpper ghcCommand; in stdenv.mkDerivation ({ @@ -264,10 +265,10 @@ stdenv.mkDerivation ({ LANG = "en_US.UTF-8"; LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive"; shellHook = '' - export NIX_GHC="${ghcEnv}/bin/${ghcCommand}" - export NIX_GHCPKG="${ghcEnv}/bin/${ghcCommand}-pkg" - export NIX_GHC_DOCDIR="${ghcEnv}/share/doc/ghc/html" - export NIX_GHC_LIBDIR="${ghcEnv}/lib/${ghcEnv.name}" + export NIX_${ghcCommandCaps}="${ghcEnv}/bin/${ghcCommand}" + export NIX_${ghcCommandCaps}PKG="${ghcEnv}/bin/${ghcCommand}-pkg" + export NIX_${ghcCommandCaps}_DOCDIR="${ghcEnv}/share/doc/ghc/html" + export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/${ghcEnv.name}" ''; }; |