|
43 | 43 | echo "${field}: ${lib.concatStringsSep " " xs}" >> $out/cabal.config
|
44 | 44 | '';
|
45 | 45 |
|
46 |
| - componentDepends = if haskellLib.isAll componentId |
47 |
| - then lib.filter (p: p.identifier.name != componentId.cname) component.depends |
48 |
| - else component.depends; |
49 |
| - |
50 | 46 | flatDepends =
|
51 | 47 | let
|
52 | 48 | makePairs = map (p: rec { key="${val}"; val=p.components.library; });
|
53 | 49 | closure = builtins.genericClosure {
|
54 |
| - startSet = makePairs componentDepends; |
| 50 | + startSet = makePairs component.depends; |
55 | 51 | operator = {val,...}: makePairs val.config.depends;
|
56 | 52 | };
|
57 | 53 | in map ({val,...}: val) closure;
|
@@ -109,15 +105,15 @@ let
|
109 | 105 | clear-package-db
|
110 | 106 | package-db $out/package.conf.d
|
111 | 107 | 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} |
113 | 109 | ${lib.concatMapStringsSep "\n" (envDep "") (lib.remove "ghc" nonReinstallablePkgs)}
|
114 | 110 |
|
115 | 111 | '' + lib.optionalString component.doExactConfig ''
|
116 | 112 | echo "--exact-configuration" >> $out/configure-flags
|
117 | 113 | echo "allow-newer: ${package.identifier.name}:*" >> $out/cabal.config
|
118 | 114 | echo "allow-older: ${package.identifier.name}:*" >> $out/cabal.config
|
119 | 115 |
|
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} |
121 | 117 | ${lib.concatMapStringsSep "\n" (exactDep "") nonReinstallablePkgs}
|
122 | 118 |
|
123 | 119 | ''
|
|
0 commit comments