From d55c01c37dcab0fa58e8b4bbb0aa70b3f7b044b4 Mon Sep 17 00:00:00 2001 From: Eman Resu Date: Mon, 20 Jul 2026 10:15:55 -0400 Subject: [PATCH] lib/systems/inspect: partially apply hasPrefix --- lib/systems/inspect.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 98b3fc050bc1..9ef67e0ec2cf 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -27,6 +27,8 @@ let execFormats ; + hasArmv7Prefix = hasPrefix "armv7"; + # Based on lib.attrsets.matchAttrs, but with: # - the initial isAttrs assertion removed, since this function is only ever # called with attrsets @@ -137,7 +139,7 @@ rec { { cpu = { inherit arch; }; } - ) (filter (cpu: hasPrefix "armv7" cpu.arch or "") (attrValues cpuTypes)); + ) (filter (cpu: cpu ? arch && hasArmv7Prefix cpu.arch) (attrValues cpuTypes)); isAarch64 = { cpu = { family = "arm";