summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/meta.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/meta.nix b/lib/meta.nix
index 62894aeb316..40d6948ebdc 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;