summary refs log tree commit diff
path: root/lib/systems
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-09-19 19:12:19 -0700
committerAdam Joseph <adam@westernsemico.com>2022-09-19 19:15:35 -0700
commit66810822f941e94340f87eba3ff78efcc3a7f5b6 (patch)
treee6044a03b2311b67377339e93f4d01fa93a89b94 /lib/systems
parent998f0f7924198b2460458728de59fe738997f28e (diff)
downloadnixpkgs-66810822f941e94340f87eba3ff78efcc3a7f5b6.tar
nixpkgs-66810822f941e94340f87eba3ff78efcc3a7f5b6.tar.gz
nixpkgs-66810822f941e94340f87eba3ff78efcc3a7f5b6.tar.bz2
nixpkgs-66810822f941e94340f87eba3ff78efcc3a7f5b6.tar.lz
nixpkgs-66810822f941e94340f87eba3ff78efcc3a7f5b6.tar.xz
nixpkgs-66810822f941e94340f87eba3ff78efcc3a7f5b6.tar.zst
nixpkgs-66810822f941e94340f87eba3ff78efcc3a7f5b6.zip
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 ee213438e04..179034eb7dd 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -8,6 +8,14 @@ let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis
 
 rec {
   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; }; };