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";