haskellLib: Add shellAware function
This commit is contained in:
parent
65b075991f
commit
3a763b9196
@ -154,6 +154,10 @@ rec {
|
|||||||
(p.override { mkDerivation = extractBuildInputs p.compiler;
|
(p.override { mkDerivation = extractBuildInputs p.compiler;
|
||||||
}).haskellBuildInputs;
|
}).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:
|
ghcInfo = ghc:
|
||||||
rec { isCross = (ghc.cross or null) != null;
|
rec { isCross = (ghc.cross or null) != null;
|
||||||
isGhcjs = ghc.isGhcjs or false;
|
isGhcjs = ghc.isGhcjs or false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user