mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
haskellLib: Add shellAware function
This commit is contained in:
parent
65b075991f
commit
3a763b9196
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue