linux stdenv: find bootstrap files by libc, then arch
This commit is contained in:
parent
4aca016313
commit
4b6b83f159
@ -6,17 +6,26 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, localSystem, crossSystem, config, overlays
|
, localSystem, crossSystem, config, overlays
|
||||||
|
|
||||||
, bootstrapFiles ? if localSystem.libc == "musl" then import ./bootstrap-files/musl64.nix
|
, bootstrapFiles ?
|
||||||
else { # switch
|
let table = {
|
||||||
"i686-linux" = import ./bootstrap-files/i686.nix;
|
"glibc" = {
|
||||||
"x86_64-linux" = import ./bootstrap-files/x86_64.nix;
|
"i686-linux" = import ./bootstrap-files/i686.nix;
|
||||||
"armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
|
"x86_64-linux" = import ./bootstrap-files/x86_64.nix;
|
||||||
"armv6l-linux" = import ./bootstrap-files/armv6l.nix;
|
"armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
|
||||||
"armv7l-linux" = import ./bootstrap-files/armv7l.nix;
|
"armv6l-linux" = import ./bootstrap-files/armv6l.nix;
|
||||||
"aarch64-linux" = import ./bootstrap-files/aarch64.nix;
|
"armv7l-linux" = import ./bootstrap-files/armv7l.nix;
|
||||||
"mips64el-linux" = import ./bootstrap-files/loongson2f.nix;
|
"aarch64-linux" = import ./bootstrap-files/aarch64.nix;
|
||||||
}.${localSystem.system}
|
"mips64el-linux" = import ./bootstrap-files/loongson2f.nix;
|
||||||
or (abort "unsupported platform for the pure Linux stdenv")
|
};
|
||||||
|
"musl" = {
|
||||||
|
"x86_64-linux" = import ./bootstrap-files/musl64.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
archLookupTable = table.${localSystem.libc}
|
||||||
|
or (abort "unsupported libc for the pure Linux stdenv");
|
||||||
|
files = archLookupTable.${localSystem.system}
|
||||||
|
or (abort "unsupported platform for the pure Linux stdenv");
|
||||||
|
in files
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert crossSystem == null;
|
assert crossSystem == null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user