@@ -13,7 +13,6 @@
1313 "x86_64-linux" = import ./bootstrap-files/x86_64.nix;
1414 "armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
1515 "armv6l-linux" = import ./bootstrap-files/armv6l.nix;
16− "armv7a-linux" = import ./bootstrap-files/armv7l.nix;
1716 "armv7l-linux" = import ./bootstrap-files/armv7l.nix;
1817 "aarch64-linux" = import ./bootstrap-files/aarch64.nix;
1918 "mipsel-linux" = import ./bootstrap-files/loongson2f.nix;
@@ -26,10 +25,19 @@
2625 "powerpc64le-linux" = import ./bootstrap-files/ppc64le-musl.nix;
2726 };
2827 };
28+
29+ # Try to find an architecture compatible with our current system. We
30+ # just try every bootstrap we’ve got and test to see if it is
31+ # compatible with or current architecture.
32+ getCompatibleTools = lib.foldl (v: system:
33+ if v != null then v
34+ else if localSystem.isCompatible (lib.systems.elaborate { inherit system; }) then archLookupTable.${system}
35+ else null) null (lib.attrNames archLookupTable);
36+
2937 archLookupTable = table.${localSystem.libc}
3038 or (abort "unsupported libc for the pure Linux stdenv");
31− files = archLookupTable.${localSystem.system}
32− or (abort "unsupported platform for the pure Linux stdenv");
39+ files = archLookupTable.${localSystem.system} or (if getCompatibleTools != null then getCompatibleTools
40+ else (abort "unsupported platform for the pure Linux stdenv"));
3341 in files
3442}:
3543