Skip to content

Commit bda8ae7

Browse files
ElvishJerriccoangerman
authored andcommitted
Revert "builder: Remove self from depends of "all" component"
This reverts commit 0747270.
1 parent e122281 commit bda8ae7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

builder/comp-builder.nix

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,11 @@ let
4343
echo "${field}: ${lib.concatStringsSep " " xs}" >> $out/cabal.config
4444
'';
4545

46-
componentDepends = if haskellLib.isAll componentId
47-
then lib.filter (p: p.identifier.name != componentId.cname) component.depends
48-
else component.depends;
49-
5046
flatDepends =
5147
let
5248
makePairs = map (p: rec { key="${val}"; val=p.components.library; });
5349
closure = builtins.genericClosure {
54-
startSet = makePairs componentDepends;
50+
startSet = makePairs component.depends;
5551
operator = {val,...}: makePairs val.config.depends;
5652
};
5753
in map ({val,...}: val) closure;
@@ -109,15 +105,15 @@ let
109105
clear-package-db
110106
package-db $out/package.conf.d
111107
EOF
112-
${lib.concatMapStringsSep "\n" (p: envDep "--package-db ${p.components.library}/package.conf.d" p.identifier.name) componentDepends}
108+
${lib.concatMapStringsSep "\n" (p: envDep "--package-db ${p.components.library}/package.conf.d" p.identifier.name) component.depends}
113109
${lib.concatMapStringsSep "\n" (envDep "") (lib.remove "ghc" nonReinstallablePkgs)}
114110
115111
'' + lib.optionalString component.doExactConfig ''
116112
echo "--exact-configuration" >> $out/configure-flags
117113
echo "allow-newer: ${package.identifier.name}:*" >> $out/cabal.config
118114
echo "allow-older: ${package.identifier.name}:*" >> $out/cabal.config
119115
120-
${lib.concatMapStringsSep "\n" (p: exactDep "--package-db ${p.components.library}/package.conf.d" p.identifier.name) componentDepends}
116+
${lib.concatMapStringsSep "\n" (p: exactDep "--package-db ${p.components.library}/package.conf.d" p.identifier.name) component.depends}
121117
${lib.concatMapStringsSep "\n" (exactDep "") nonReinstallablePkgs}
122118
123119
''

0 commit comments

Comments
 (0)