lib/systems/inspect: partially apply hasPrefix

This commit is contained in:
Eman Resu
2026-07-20 10:29:40 -04:00
parent 102526a4d5
commit d55c01c37d
+3 -1
View File
@@ -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";