diff options
Diffstat (limited to 'pkgs/stdenv/generic/check-meta.nix')
-rw-r--r-- | pkgs/stdenv/generic/check-meta.nix | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 4774d7602437e..113b95f3ab00c 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -173,10 +173,8 @@ 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 - raw = attrs.meta.platforms; - uniform = map (x: if builtins.isString x then { system = x; } else { parsed = x; }) raw; - in lib.any (pat: lib.matchAttrs pat hostPlatform) uniform; + checkPlatform = attrs: + lib.any (lib.meta.platformMatch hostPlatform) attrs.meta.platforms; # Check if a derivation is valid, that is whether it passes checks for # e.g brokenness or license. |