3
0
Fork 0
forked from mirrors/nixpkgs

meta: Add NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM for consistency

This commit is contained in:
John Ericson 2018-04-17 16:02:50 -04:00
parent 3955b84698
commit cb212cf549

View file

@ -8,7 +8,8 @@ let
# for why this defaults to false, but I (@copumpkin) want to default it to true soon. # for why this defaults to false, but I (@copumpkin) want to default it to true soon.
shouldCheckMeta = config.checkMeta or false; shouldCheckMeta = config.checkMeta or false;
allowUnfree = config.allowUnfree or false || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1"; allowUnfree = config.allowUnfree or false
|| builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1";
whitelist = config.whitelistedLicenses or []; whitelist = config.whitelistedLicenses or [];
blacklist = config.blacklistedLicenses or []; blacklist = config.blacklistedLicenses or [];
@ -35,9 +36,11 @@ let
hasBlacklistedLicense = assert areLicenseListsValid; attrs: hasBlacklistedLicense = assert areLicenseListsValid; attrs:
hasLicense attrs && builtins.elem attrs.meta.license blacklist; hasLicense attrs && builtins.elem attrs.meta.license blacklist;
allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; allowBroken = config.allowBroken or false
|| builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
allowUnsupportedSystem = config.allowUnsupportedSystem or false; allowUnsupportedSystem = config.allowUnsupportedSystem or false
|| builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
isUnfree = licenses: lib.lists.any (l: isUnfree = licenses: lib.lists.any (l:
!l.free or true || l == "unfree" || l == "unfree-redistributable") licenses; !l.free or true || l == "unfree" || l == "unfree-redistributable") licenses;