diff --git a/lib/meta.nix b/lib/meta.nix index 62894aeb316b..40d6948ebdc7 100644 --- a/lib/meta.nix +++ b/lib/meta.nix @@ -76,7 +76,9 @@ rec { 1. (legacy) a system string. - 2. (modern) a pattern for the platform `parsed` field. + 2. (modern) a pattern for the entire platform structure. + + 3. (modern) a pattern for the platform `parsed` field. We can inject these into a pattern for the whole of a structured platform, and then match that. @@ -85,6 +87,8 @@ rec { pattern = if builtins.isString elem then { system = elem; } + else if elem?parsed + then elem else { parsed = elem; }; in lib.matchAttrs pattern platform;