lib/systems/inspect: partially apply hasPrefix
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user