on iko/ghcjs-patch-master help sign in
Use new library component name
commit25989364af580670957f8e6a6670f872cf435189 authorWill Fancher <elvishjerricco@gmail.com> dateMon 29 Oct 2018, 02:37 (8 years ago) parentb2e94e9
3 files changed+5−4
builder/comp-builder.nix+1−1 builder/default.nix+1−1 lib/default.nix+3−2
builder/comp-builder.nix+1−1
@@ -19,7 +19,7 @@ let
1919 allFlagsAndConfigs = {
2020 packageDbs =
2121 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; });
2323 closure = builtins.genericClosure {
2424 startSet = makePairs component.depends;
2525 operator = {val,...}: makePairs val.config.depends;
builder/default.nix+1−1
@@ -74,7 +74,7 @@ let
7474 };
7575
7676in {
77− components = haskellLib.applyComponents buildComp components;
77+ components = haskellLib.applyComponents buildComp config;
7878 inherit (package) identifier;
7979 inherit setup cabalFile;
8080 isHaskell = true;
lib/default.nix+3−2
@@ -63,9 +63,10 @@ with haskellLib;
6363 benchmarks = "bench";
6464 };
6565
66− applyComponents = f: comps:
66+ applyComponents = f: config:
6767 let
68− libComp = lib.mapAttrs (cname: f {ctype="lib"; inherit cname;}) (removeAttrs comps subComponentTypes);
68+ comps = config.components;
69+ libComp = lib.mapAttrs (cname: f {ctype="lib"; cname=config.package.identifier.name;}) (removeAttrs comps subComponentTypes);
6970 subComps = lib.mapAttrs
7071 (ctype: lib.mapAttrs (cname: f {inherit cname; ctype=componentPrefix.${ctype};}))
7172 (builtins.intersectAttrs (lib.genAttrs subComponentTypes (_: null)) comps);