diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix index 6a724130d254..da4e9c6777bd 100644 --- a/pkgs/development/haskell-modules/lib.nix +++ b/pkgs/development/haskell-modules/lib.nix @@ -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;