mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-11 06:55:40 +03:00
Support library-less cabal files.
This commit is contained in:
parent
373ac25398
commit
696f22d87f
@ -44,7 +44,7 @@ with haskellLib;
|
||||
applyLibrary = cname: f { cname = config.package.identifier.name; ctype = "lib"; };
|
||||
applySubComp = ctype: cname: f { inherit cname; ctype = componentPrefix.${ctype}; };
|
||||
applyAllComp = f { cname = config.package.identifier.name; ctype = "all"; };
|
||||
libComp = lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "all" ]));
|
||||
libComp = if comps.library == null then {} else lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "all" ]));
|
||||
subComps = lib.mapAttrs
|
||||
(ctype: lib.mapAttrs (applySubComp ctype))
|
||||
(builtins.intersectAttrs (lib.genAttrs subComponentTypes (_: null)) comps);
|
||||
|
@ -160,7 +160,8 @@ in {
|
||||
};
|
||||
in {
|
||||
library = mkOption {
|
||||
type = componentType;
|
||||
type = nullOr componentType;
|
||||
default = null;
|
||||
};
|
||||
sublibs = mkOption {
|
||||
type = attrsOf componentType;
|
||||
|
Loading…
Reference in New Issue
Block a user