forked from mirrors/nixpkgs
meta: Add NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM
for consistency
This commit is contained in:
parent
3955b84698
commit
cb212cf549
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue