about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/with-packages-wrapper.nix
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-01-09 19:27:47 +0100
committerPeter Simons <simons@cryp.to>2015-01-09 19:30:14 +0100
commit38e2e8702c2548c60b8961951552e35ee812c426 (patch)
treeec2ef0daad54f9e9d4c7c5848d9160c99613520a /pkgs/development/haskell-modules/with-packages-wrapper.nix
parent96ae5d58bfa3bb64449bef3703238a1cdc76eff0 (diff)
downloadnixlib-38e2e8702c2548c60b8961951552e35ee812c426.tar
nixlib-38e2e8702c2548c60b8961951552e35ee812c426.tar.gz
nixlib-38e2e8702c2548c60b8961951552e35ee812c426.tar.bz2
nixlib-38e2e8702c2548c60b8961951552e35ee812c426.tar.lz
nixlib-38e2e8702c2548c60b8961951552e35ee812c426.tar.xz
nixlib-38e2e8702c2548c60b8961951552e35ee812c426.tar.zst
nixlib-38e2e8702c2548c60b8961951552e35ee812c426.zip
ghcWithPackages: call this derivation exactly like the compiler it's based on
Furthermore, export "name" and "version" attributes that match those of the
underlying compiler. These changes make a ghcWithPackages-generated wrapper
look exactly like a normal GHC derivation and it can be used anywhere in
Nixpkgs where a normal GHC would be used.
Diffstat (limited to 'pkgs/development/haskell-modules/with-packages-wrapper.nix')
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index 071f868875f5..ad88703edd5c 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -33,8 +33,8 @@ let
   isHaskellPkg  = x: (x ? pname) && (x ? version);
 in
 if packages == [] then ghc else
-buildEnv {
-  name = "haskell-env-${ghc.name}";
+stdenv.lib.addPassthru (buildEnv {
+  inherit (ghc) name;
   paths = stdenv.lib.filter isHaskellPkg (stdenv.lib.closePropagation packages) ++ [ghc];
   inherit ignoreCollisions;
   postBuild = ''
@@ -76,4 +76,4 @@ buildEnv {
     $out/bin/ghc-pkg recache
     $out/bin/ghc-pkg check
   '';
-}
+}) { inherit (ghc) version; }