on iko/ghcjs-patch-master help sign in
Support library-less cabal files.
commit696f22d87f1e6bb210244f05084599299fa752f8 authorMoritz Angermann <moritz.angermann@gmail.com> dateThu 14 Mar 2019, 21:44 (8 years ago) parent373ac25
2 files changed+3−2
lib/default.nix+1−1 modules/package.nix+2−1
lib/default.nix+1−1
@@ -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);
modules/package.nix+2−1
@@ -160,7 +160,8 @@ in {
160160 };
161161 in {
162162 library = mkOption {
163− type = componentType;
163+ type = nullOr componentType;
164+ default = null;
164165 };
165166 sublibs = mkOption {
166167 type = attrsOf componentType;