diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-04-22 22:31:30 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-04-22 22:31:30 +0300 |
commit | 3c6e077301146c221c3780afb66d93523fbebd27 (patch) | |
tree | e3f1b18251e151298e15fa0727c0bd42695aec93 /pkgs/stdenv/generic | |
parent | c70a245bb314250271c0fa1b6bcc78f80f867dfe (diff) | |
parent | 6a819c8f8c9100eb1a79515f10ad2d0d49b42ed5 (diff) | |
download | nixlib-3c6e077301146c221c3780afb66d93523fbebd27.tar nixlib-3c6e077301146c221c3780afb66d93523fbebd27.tar.gz nixlib-3c6e077301146c221c3780afb66d93523fbebd27.tar.bz2 nixlib-3c6e077301146c221c3780afb66d93523fbebd27.tar.lz nixlib-3c6e077301146c221c3780afb66d93523fbebd27.tar.xz nixlib-3c6e077301146c221c3780afb66d93523fbebd27.tar.zst nixlib-3c6e077301146c221c3780afb66d93523fbebd27.zip |
Merge remote-tracking branch 'upstream/master' into HEAD
Conflicts: pkgs/development/tools/misc/binutils/default.nix
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/check-meta.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 26522ad6045e..1350e7d37301 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -8,7 +8,8 @@ let # for why this defaults to false, but I (@copumpkin) want to default it to true soon. 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 []; blacklist = config.blacklistedLicenses or []; @@ -35,9 +36,11 @@ let hasBlacklistedLicense = assert areLicenseListsValid; attrs: 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: !l.free or true || l == "unfree" || l == "unfree-redistributable") licenses; @@ -75,6 +78,7 @@ let remediation = { unfree = remediate_whitelist "Unfree"; broken = remediate_whitelist "Broken"; + unsupported = remediate_whitelist "UnsupportedSystem"; blacklisted = x: ""; insecure = remediate_insecure; unknown-meta = x: ""; @@ -144,7 +148,7 @@ let license = either (listOf lib.types.attrs) (either lib.types.attrs str); maintainers = listOf (attrsOf str); priority = int; - platforms = listOf (either str lib.systems.parsed.types.system); + platforms = listOf (either str lib.systems.parsedPlatform.types.system); hydraPlatforms = listOf str; broken = bool; @@ -192,8 +196,8 @@ let { valid = false; reason = "blacklisted"; errormsg = "has a blacklisted license (‘${showLicense attrs.meta.license}’)"; } else if !allowBroken && attrs.meta.broken or false then { valid = false; reason = "broken"; errormsg = "is marked as broken"; } - else if !allowUnsupportedSystem && !allowBroken && !(checkPlatform attrs) then - { valid = false; reason = "broken"; errormsg = "is not supported on ‘${hostPlatform.config}’"; } + else if !allowUnsupportedSystem && !(checkPlatform attrs) then + { valid = false; reason = "unsupported"; errormsg = "is not supported on ‘${hostPlatform.config}’"; } else if !(hasAllowedInsecure attrs) then { valid = false; reason = "insecure"; errormsg = "is marked as insecure"; } else let res = checkMeta (attrs.meta or {}); in if res != [] then |