nixpkgs-suyu/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
Artturin 1270ef59e9 bootstrap-tools-cross: Rename bootstrap file jobs to be more descriptive
Rename files in `bootstrap-files/` to match jobs in `make-bootstrap-tools-cross`.

Should make automating the bootstrap files easier.

```nix
$ nix repl --file ./pkgs/top-level/release-cross.nix
nix-repl> bootstrapTools
{ aarch64-unknown-linux-gnu = { ... }; aarch64-unknown-linux-musl = { ... }; armv5tel-unknown-linux-gnueabi = { ... }; armv6l-unknown-linux-gnueabihf = { ... }; armv6l-unknown-linux-musleabihf = { ... }; armv7l-unknown-linux-gnueabihf = { ... }; mips64el-unknown-linux-gnuabi64 = {... }; mips64el-unknown-linux-gnuabin32 = { ... }; mipsel-unknown-linux-gnu = { ... }; powerpc64le-unknown-linux-gnu = { ... }; riscv64-unknown-linux-gnu = { ... }; x86_64-unknown-linux-musl = { ... }; }
```

Additionally if non-linux bootstrap files are added to
`make-bootstrap-tools-cross` then there won't be any renaming needed.
2023-10-03 23:34:40 +03:00

32 lines
1.2 KiB
Nix

{system ? builtins.currentSystem}:
let
inherit (releaseLib) lib;
releaseLib = import ../../top-level/release-lib.nix {
# We're not using any functions from release-lib.nix that look at
# supportedSystems.
supportedSystems = [];
};
make = crossSystem: import ./make-bootstrap-tools.nix {
pkgs = releaseLib.pkgsForCross crossSystem system;
};
in lib.mapAttrs (n: make) (with lib.systems.examples; {
# NOTE: Only add platforms for which there are files in `./bootstrap-files`.
# Sort following the sorting in `./default.nix` `bootstrapFiles` argument.
armv5tel-unknown-linux-gnueabi = sheevaplug;
armv6l-unknown-linux-gnueabihf = raspberryPi;
armv7l-unknown-linux-gnueabihf = armv7l-hf-multiplatform;
aarch64-unknown-linux-gnu = aarch64-multiplatform;
mipsel-unknown-linux-gnu = mipsel-linux-gnu;
mips64el-unknown-linux-gnuabin32 = mips64el-linux-gnuabin32;
mips64el-unknown-linux-gnuabi64 = mips64el-linux-gnuabi64;
powerpc64le-unknown-linux-gnu = powernv;
riscv64-unknown-linux-gnu = riscv64;
# musl
aarch64-unknown-linux-musl = aarch64-multiplatform-musl;
armv6l-unknown-linux-musleabihf = muslpi;
x86_64-unknown-linux-musl = musl64;
})