@@ -73,8 +73,12 @@ in {
73 comps = config.components;
73 comps = config.components;
74 applyLibrary = cname: f { cname = config.package.identifier.name; ctype = "lib"; };
74 applyLibrary = cname: f { cname = config.package.identifier.name; ctype = "lib"; };
75 applySubComp = ctype: cname: f { inherit cname; ctype = componentPrefix.${ctype} or (throw "Missing component mapping for ${ctype}."); };
75 applySubComp = ctype: cname: f { inherit cname; ctype = componentPrefix.${ctype} or (throw "Missing component mapping for ${ctype}."); };
77+ config.package.buildable # Set manually in a module (allows whole packages to be disabled)
78+ && comp.buildable # Set based on `buildable` in `.cabal` files
79+ && comp.planned; # Set if the component was in the `plan.json`
76− buildableAttrs = lib.filterAttrs (n: comp: comp.buildable or true && comp.planned);
80+ buildableAttrs = lib.filterAttrs (n: isBuildable);
77− libComp = if comps.library == null || !(comps.library.buildable or true && comps.library.planned)
81+ libComp = if comps.library == null || !(isBuildable comps.library)
79 else lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "setup" ]));
83 else lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "setup" ]));
80 subComps = lib.mapAttrs
84 subComps = lib.mapAttrs