mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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.
This commit is contained in:
parent
96ae5d58bf
commit
38e2e8702c
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user