diff options
author | Alexander Ried <ried@mytum.de> | 2016-10-22 02:10:38 +0200 |
---|---|---|
committer | Alexander Ried <ried@mytum.de> | 2016-10-22 02:43:13 +0200 |
commit | 43ce115ca91d34af1640f9ece2e5526e44dd2c7e (patch) | |
tree | 85130a78dbd59edc6af0209e82781999309b9015 /pkgs/stdenv/generic | |
parent | 89672d530b19296b5f0085082e65a071786fdd47 (diff) |
stdenv.hasLicense: ? supports nested lookup
this avoids one copy of the attrset
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 372fd3cfa5268..f969d246ff57b 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -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; |