shellFor: Don't suck in src to compare to deps. [Fixes #51079]
This commit is contained in:
parent
7897dadbbf
commit
24ccaf65df
|
@ -272,7 +272,10 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
|
||||||
# bash$ nix-shell --run "cabal new-build all"
|
# bash$ nix-shell --run "cabal new-build all"
|
||||||
shellFor = { packages, withHoogle ? false, ... } @ args:
|
shellFor = { packages, withHoogle ? false, ... } @ args:
|
||||||
let
|
let
|
||||||
selected = packages self;
|
nullSrc = p: overrideCabal p (_: { src = null; });
|
||||||
|
|
||||||
|
# Make sure we *never* accidentally suck in src.
|
||||||
|
selected = map nullSrc (packages self);
|
||||||
|
|
||||||
packageInputs = map getBuildInputs selected;
|
packageInputs = map getBuildInputs selected;
|
||||||
|
|
||||||
|
@ -284,7 +287,8 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
|
||||||
# because cabal will end up ignoring that built version, assuming
|
# because cabal will end up ignoring that built version, assuming
|
||||||
# new-style commands.
|
# new-style commands.
|
||||||
haskellInputs = pkgs.lib.filter
|
haskellInputs = pkgs.lib.filter
|
||||||
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected)
|
# nullSrc in case a dep is one of the selected packages.
|
||||||
|
(input: pkgs.lib.all (p: (nullSrc input).outPath != p.outPath) selected)
|
||||||
(pkgs.lib.concatMap (p: p.haskellBuildInputs) packageInputs);
|
(pkgs.lib.concatMap (p: p.haskellBuildInputs) packageInputs);
|
||||||
systemInputs = pkgs.lib.concatMap (p: p.systemBuildInputs) packageInputs;
|
systemInputs = pkgs.lib.concatMap (p: p.systemBuildInputs) packageInputs;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue