blob: f59a6a8f64a5eaeb59dff3f159e2ab964791345c [file] [log] [blame]
Tim Windelschmidt98000a52025-03-06 14:22:15 +01001{ pkgs ? import ../../../third_party/nix/default.nix { } }: with pkgs;
2symlinkJoin {
3 name = "toolchain";
4 paths =
5 let
6 platforms = with pkgsCross; [
7 aarch64-multiplatform-musl
8 musl64
9 ];
10 in
11 map
12 (platform: (
13 let
14 merged = buildEnv {
15 name = "toolchain-env";
16 paths = with platform.pkgsStatic; [
17 gnumake
18 flex
19 bison
20 lz4
21 busybox
22 findutils
23 bc
24 util-linux-minimal # custom pkg
25 perl
26 nasm
27 acpica-tools
28 patch
29 diffutils
30 qemu-minimal # custom pkg
31 m4
32 strace
33 ];
34 };
35 in
36 stdenv.mkDerivation rec {
37 name = "toolchain-bundle";
38 buildInputs = [ gnutar zstd ];
39
40 phases = [ "buildPhase" "installPhase" ];
41 buildPhase = ''
42 tar --zstd --sort=name --hard-dereference -hcf bundle.tar.zst -C ${merged} .
43 '';
44
45 installPhase = ''
46 mkdir $out
47 mv bundle.tar.zst $out/${name}-${platform.hostPlatform.config}-${lib.version}.tar.zst
48 '';
49 }
50 ))
51 platforms;
52}