haskellPackages.shellFor: fix after recent getHaskellBuildInputs fix.

Fixes #45318
This commit is contained in:
Shea Levy
2018-08-19 15:17:35 -04:00
parent 367b90a760
commit b00b2363b3
2 changed files with 11 additions and 8 deletions
+9 -6
View File
@@ -295,15 +295,18 @@ rec {
overrideSrc = drv: { src, version ? drv.version }:
overrideCabal drv (_: { inherit src version; editedCabalFile = null; });
# Get all of the build inputs of a haskell package, divided by category.
getBuildInputs = p:
(overrideCabal p (args: {
passthru = (args.passthru or {}) // {
_getBuildInputs = extractBuildInputs p.compiler args;
};
}))._getBuildInputs;
# Extract the haskell build inputs of a haskell package.
# This is useful to build environments for developing on that
# package.
getHaskellBuildInputs = p:
(overrideCabal p (args: {
passthru = (args.passthru or {}) // {
_getHaskellBuildInputs = (extractBuildInputs p.compiler args).haskellBuildInputs;
};
}))._getHaskellBuildInputs;
getHaskellBuildInputs = p: (getBuildInputs p).haskellBuildInputs;
# Under normal evaluation, simply return the original package. Under
# nix-shell evaluation, return a nix-shell optimized environment.