mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
Merge pull request #19769 from groxxda/license
stdenv.hasLicense: ? supports nested lookup
This commit is contained in:
commit
3d5630fac9
|
@ -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 a new issue