haskellPackages.shellFor: fix after recent getHaskellBuildInputs fix.
Fixes #45318
This commit is contained in:
parent
367b90a760
commit
b00b2363b3
@ -295,15 +295,18 @@ rec {
|
|||||||
overrideSrc = drv: { src, version ? drv.version }:
|
overrideSrc = drv: { src, version ? drv.version }:
|
||||||
overrideCabal drv (_: { inherit src version; editedCabalFile = null; });
|
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.
|
# Extract the haskell build inputs of a haskell package.
|
||||||
# This is useful to build environments for developing on that
|
# This is useful to build environments for developing on that
|
||||||
# package.
|
# package.
|
||||||
getHaskellBuildInputs = p:
|
getHaskellBuildInputs = p: (getBuildInputs p).haskellBuildInputs;
|
||||||
(overrideCabal p (args: {
|
|
||||||
passthru = (args.passthru or {}) // {
|
|
||||||
_getHaskellBuildInputs = (extractBuildInputs p.compiler args).haskellBuildInputs;
|
|
||||||
};
|
|
||||||
}))._getHaskellBuildInputs;
|
|
||||||
|
|
||||||
# Under normal evaluation, simply return the original package. Under
|
# Under normal evaluation, simply return the original package. Under
|
||||||
# nix-shell evaluation, return a nix-shell optimized environment.
|
# nix-shell evaluation, return a nix-shell optimized environment.
|
||||||
|
@ -38,7 +38,7 @@ let
|
|||||||
inherit (stdenv) buildPlatform hostPlatform;
|
inherit (stdenv) buildPlatform hostPlatform;
|
||||||
|
|
||||||
inherit (stdenv.lib) fix' extends makeOverridable;
|
inherit (stdenv.lib) fix' extends makeOverridable;
|
||||||
inherit (haskellLib) overrideCabal getHaskellBuildInputs;
|
inherit (haskellLib) overrideCabal getBuildInputs;
|
||||||
|
|
||||||
mkDerivationImpl = pkgs.callPackage ./generic-builder.nix {
|
mkDerivationImpl = pkgs.callPackage ./generic-builder.nix {
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
@ -257,7 +257,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
|
|||||||
shellFor = { packages, withHoogle ? false, ... } @ args:
|
shellFor = { packages, withHoogle ? false, ... } @ args:
|
||||||
let
|
let
|
||||||
selected = packages self;
|
selected = packages self;
|
||||||
packageInputs = builtins.map getHaskellBuildInputs selected;
|
packageInputs = builtins.map getBuildInputs selected;
|
||||||
haskellInputs =
|
haskellInputs =
|
||||||
builtins.filter
|
builtins.filter
|
||||||
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected)
|
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user