on iko/ghcjs-patch-master help sign in
Use new library component name
2598936Will Fancher
builder/comp-builder.nix+1−1
@@ -19,7 +19,7 @@ let
19 allFlagsAndConfigs = {
19 allFlagsAndConfigs = {
20 packageDbs =
20 packageDbs =
21 let
21 let
22− makePairs = map (p: rec { key="${val}"; val=p.components.${p.identifier.name}; });
22+ makePairs = map (p: rec { key="${val}"; val=p.components.library; });
23 closure = builtins.genericClosure {
23 closure = builtins.genericClosure {
24 startSet = makePairs component.depends;
24 startSet = makePairs component.depends;
25 operator = {val,...}: makePairs val.config.depends;
25 operator = {val,...}: makePairs val.config.depends;
builder/default.nix+1−1
@@ -74,7 +74,7 @@ let
74 };
74 };
75
75
76in {
76in {
77− components = haskellLib.applyComponents buildComp components;
77+ components = haskellLib.applyComponents buildComp config;
78 inherit (package) identifier;
78 inherit (package) identifier;
79 inherit setup cabalFile;
79 inherit setup cabalFile;
80 isHaskell = true;
80 isHaskell = true;
lib/default.nix+3−2
@@ -63,9 +63,10 @@ with haskellLib;
63 benchmarks = "bench";
63 benchmarks = "bench";
64 };
64 };
65
65
66− applyComponents = f: comps:
66+ applyComponents = f: config:
67 let
67 let
68+ comps = config.components;
68− libComp = lib.mapAttrs (cname: f {ctype="lib"; inherit cname;}) (removeAttrs comps subComponentTypes);
69+ libComp = lib.mapAttrs (cname: f {ctype="lib"; cname=config.package.identifier.name;}) (removeAttrs comps subComponentTypes);
69 subComps = lib.mapAttrs
70 subComps = lib.mapAttrs
70 (ctype: lib.mapAttrs (cname: f {inherit cname; ctype=componentPrefix.${ctype};}))
71 (ctype: lib.mapAttrs (cname: f {inherit cname; ctype=componentPrefix.${ctype};}))
71 (builtins.intersectAttrs (lib.genAttrs subComponentTypes (_: null)) comps);
72 (builtins.intersectAttrs (lib.genAttrs subComponentTypes (_: null)) comps);