3
0
Fork 0
forked from mirrors/nixpkgs

stdenv/check-meta: remove onlyLicenses check

This commit is contained in:
Naïm Favier 2022-02-17 13:09:23 +01:00
parent 0e6dd09d24
commit 1ffdf02435
No known key found for this signature in database
GPG key ID: 49B07322580B7EE2

View file

@ -19,16 +19,9 @@ let
allowlist = config.allowlistedLicenses or config.whitelistedLicenses or [];
blocklist = config.blocklistedLicenses or config.blacklistedLicenses or [];
onlyLicenses = list:
lib.lists.all (license:
let l = lib.licenses.${license.shortName or "BROKEN"} or false; in
if license == l then true else
throw ''${showLicense license} is not an attribute of lib.licenses''
) list;
areLicenseListsValid =
if lib.mutuallyExclusive allowlist blocklist then
assert onlyLicenses allowlist; assert onlyLicenses blocklist; true
true
else
throw "allowlistedLicenses and blocklistedLicenses are not mutually exclusive.";