mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-25 22:57:29 +03:00
haskellLib: Add shellAware function
This commit is contained in:
parent
65b075991f
commit
3a763b9196
@ -154,6 +154,10 @@ rec {
|
||||
(p.override { mkDerivation = extractBuildInputs p.compiler;
|
||||
}).haskellBuildInputs;
|
||||
|
||||
# Under normal evaluation, simply return the original package. Under
|
||||
# nix-shell evaluation, return a nix-shell optimized environment.
|
||||
shellAware = p: if lib.inNixShell then p.env else p;
|
||||
|
||||
ghcInfo = ghc:
|
||||
rec { isCross = (ghc.cross or null) != null;
|
||||
isGhcjs = ghc.isGhcjs or false;
|
||||
|
Loading…
Reference in New Issue
Block a user