summaryrefslogtreecommitdiffstats
path: root/pkgs/stdenv/generic
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-06-05 11:06:44 +0200
committerVladimír Čunát <v@cunat.cz>2019-06-05 11:06:44 +0200
commit576af1718704f9eca5db0983a94edcf8d06caddd (patch)
tree5abaed9414b2de580360f7fe1e1add62bff81dd5 /pkgs/stdenv/generic
parentc4724fb7bcc83a778632ce096e37b7dcdd3b034b (diff)
parente283999204ef8b7c3c3e10e93da82bf39f06d1fa (diff)
Merge branch 'master' into staging-next
Hydra nixpkgs: ?compare=1523575
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r--pkgs/stdenv/generic/check-meta.nix13
1 files changed, 5 insertions, 8 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix
index 8cb0ad79587e..89e2a7a8031c 100644
--- a/pkgs/stdenv/generic/check-meta.nix
+++ b/pkgs/stdenv/generic/check-meta.nix
@@ -169,7 +169,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.parsedPlatform.types.system);
+ platforms = listOf str;
hydraPlatforms = listOf str;
broken = bool;
# TODO: refactor once something like Profpatsch's types-simple will land
@@ -210,11 +210,6 @@ let
else "key '${k}' is unrecognized; expected one of: \n\t [${lib.concatMapStringsSep ", " (x: "'${x}'") (lib.attrNames metaTypes)}]";
checkMeta = meta: if shouldCheckMeta then lib.remove null (lib.mapAttrsToList checkMetaAttr meta) else [];
- checkPlatform = attrs: let
- anyMatch = lib.any (lib.meta.platformMatch hostPlatform);
- in anyMatch (attrs.meta.platforms or lib.platforms.all) &&
- ! anyMatch (attrs.meta.badPlatforms or []);
-
checkOutputsToInstall = attrs: let
expectedOutputs = attrs.meta.outputsToInstall or [];
actualOutputs = attrs.outputs or [ "out" ];
@@ -236,8 +231,10 @@ 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 && !(checkPlatform attrs) then
- { valid = false; reason = "unsupported"; errormsg = "is not supported on ‘${hostPlatform.config}’"; }
+ else if !allowUnsupportedSystem &&
+ (!lib.lists.elem hostPlatform.system (attrs.meta.platforms or lib.platforms.all) ||
+ lib.lists.elem hostPlatform.system (attrs.meta.badPlatforms or [])) then
+ { valid = false; reason = "unsupported"; errormsg = "is not supported on ‘${hostPlatform.system}’"; }
else if !(hasAllowedInsecure attrs) then
{ valid = false; reason = "insecure"; errormsg = "is marked as insecure"; }
else if checkOutputsToInstall attrs then