From 43ce115ca91d34af1640f9ece2e5526e44dd2c7e Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Sat, 22 Oct 2016 02:10:38 +0200 Subject: [PATCH] stdenv.hasLicense: ? supports nested lookup this avoids one copy of the attrset --- pkgs/stdenv/generic/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 372fd3cfa52..f969d246ff5 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;