stdenv.hasLicense: ? supports nested lookup
this avoids one copy of the attrset
This commit is contained in:
parent
89672d530b
commit
43ce115ca9
@ -44,7 +44,7 @@ let
|
||||
throw "whitelistedLicenses and blacklistedLicenses are not mutually exclusive.";
|
||||
|
||||
hasLicense = attrs:
|
||||
builtins.hasAttr "meta" attrs && builtins.hasAttr "license" attrs.meta;
|
||||
attrs ? meta.license;
|
||||
|
||||
hasWhitelistedLicense = assert areLicenseListsValid; attrs:
|
||||
hasLicense attrs && builtins.elem attrs.meta.license whitelist;
|
||||
|
Loading…
Reference in New Issue
Block a user