summary refs log tree commit diff
path: root/lib/systems
diff options
context:
space:
mode:
authorAdam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>2023-04-24 02:21:36 +0000
committerGitHub <noreply@github.com>2023-04-24 02:21:36 +0000
commited65f784a7193656207f19443d229c9aa314604e (patch)
treec11774125975a0a90ceaf57788b139b8a6b82d1e /lib/systems
parentd0002900e29316d409d3ac6e56b99cd99c0d161c (diff)
parent66810822f941e94340f87eba3ff78efcc3a7f5b6 (diff)
Merge pull request #191995 from amjoseph-nixpkgs/lib/systems/inspect/comment
lib/systems/inspect.nix: explanatory comment
Diffstat (limited to 'lib/systems')
-rw-r--r--lib/systems/inspect.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix
index b32c8630107b4..1700049ca4bf1 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -9,6 +9,14 @@ let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis
 rec {
   # these patterns are to be matched against {host,build,target}Platform.parsed
   patterns = rec {
+    # The patterns below are lists in sum-of-products form.
+    #
+    # Each attribute is list of product conditions; non-list values are treated
+    # as a singleton list.  If *any* product condition in the list matches then
+    # the predicate matches.  Each product condition is tested by
+    # `lib.attrsets.matchAttrs`, which requires a match on *all* attributes of
+    # the product.
+
     isi686         = { cpu = cpuTypes.i686; };
     isx86_32       = { cpu = { family = "x86"; bits = 32; }; };
     isx86_64       = { cpu = { family = "x86"; bits = 64; }; };