Merge pull request #19769 from groxxda/license

stdenv.hasLicense: ? supports nested lookup
This commit is contained in:
Joachim F 2016-10-24 15:19:12 +02:00 committed by GitHub
commit 3d5630fac9

View file

@ -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;