diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-01-31 00:02:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 00:02:31 +0000 |
commit | dd1ff149da07cd25a3e0152c67184e049256fcf1 (patch) | |
tree | 98dd4e2a8ffa16ee3990d1610053bfbcd2003dc8 /lib/systems/inspect.nix | |
parent | 7b0719bd7411ffe9935af524729055f58fa6a537 (diff) | |
parent | fe85b09c8be67eb08edbe43122a0301b62a40ef0 (diff) |
Merge master into staging-next
Diffstat (limited to 'lib/systems/inspect.nix')
-rw-r--r-- | lib/systems/inspect.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 6a9f0fadcd3d1..30615c9fde32c 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -7,6 +7,7 @@ let abis_ = abis; in let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis_; in rec { + # these patterns are to be matched against {host,build,target}Platform.parsed patterns = rec { isi686 = { cpu = cpuTypes.i686; }; isx86_32 = { cpu = { family = "x86"; bits = 32; }; }; @@ -95,4 +96,13 @@ rec { else matchAttrs patterns; predicates = mapAttrs (_: matchAnyAttrs) patterns; + + # these patterns are to be matched against the entire + # {host,build,target}Platform structure; they include a `parsed={}` marker so + # that `lib.meta.availableOn` can distinguish them from the patterns which + # apply only to the `parsed` field. + + platformPatterns = mapAttrs (_: p: { parsed = {}; } // p) { + isStatic = { isStatic = true; }; + }; } |