@@ -44,7 +44,7 @@ with haskellLib;
4444 applyLibrary = cname: f { cname = config.package.identifier.name; ctype = "lib"; };
4545 applySubComp = ctype: cname: f { inherit cname; ctype = componentPrefix.${ctype}; };
4646 applyAllComp = f { cname = config.package.identifier.name; ctype = "all"; };
47− libComp = lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "all" ]));
47+ libComp = if comps.library == null then {} else lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "all" ]));
4848 subComps = lib.mapAttrs
4949 (ctype: lib.mapAttrs (applySubComp ctype))
5050 (builtins.intersectAttrs (lib.genAttrs subComponentTypes (_: null)) comps);