diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-11-03 12:08:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-03 12:08:41 -0500 |
commit | a6a3958c265d7184d0d47b1ac50119cd19c53b11 (patch) | |
tree | 69c9ab881b50f246e8cf65b32774b0feef4df896 /pkgs/stdenv | |
parent | c751f6000b2a1529b59ee1720a33d0efae31d58a (diff) | |
parent | b12605563f5692ae146cdc40a2d8eb1c6d338501 (diff) |
Merge pull request #72070 from graham33/fix/license_list
Fix handling of lists in whitelistedLicenses and blacklistedLicenses
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/check-meta.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index b754230b0be95..6bd6a9bf41eff 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -36,10 +36,10 @@ let attrs ? meta.license; hasWhitelistedLicense = assert areLicenseListsValid; attrs: - hasLicense attrs && builtins.elem attrs.meta.license whitelist; + hasLicense attrs && lib.lists.any (l: builtins.elem l whitelist) (lib.lists.toList attrs.meta.license); hasBlacklistedLicense = assert areLicenseListsValid; attrs: - hasLicense attrs && builtins.elem attrs.meta.license blacklist; + hasLicense attrs && lib.lists.any (l: builtins.elem l blacklist) (lib.lists.toList attrs.meta.license); allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; @@ -75,7 +75,7 @@ let allowInsecurePredicate attrs || builtins.getEnv "NIXPKGS_ALLOW_INSECURE" == "1"; - showLicense = license: license.shortName or "unknown"; + showLicense = license: toString (map (l: l.shortName or "unknown") (lib.lists.toList license)); pos_str = meta: meta.position or "«unknown-file»"; |