lol

freshBootstrapTools: unify glibc and musl into the same directory

CI required that I `nixfmt` them at the same time.

+72 -46
-19
pkgs/stdenv/linux/bootstrap-tools-musl/default.nix
··· 1 - { system, bootstrapFiles, extraAttrs }: 2 - 3 - derivation ({ 4 - name = "bootstrap-tools"; 5 - 6 - builder = bootstrapFiles.busybox; 7 - 8 - args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ]; 9 - 10 - tarball = bootstrapFiles.bootstrapTools; 11 - 12 - inherit system; 13 - 14 - # Needed by the GCC wrapper. 15 - langC = true; 16 - langCC = true; 17 - isGNU = true; 18 - hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" "trivialautovarinit" ]; 19 - } // extraAttrs)
pkgs/stdenv/linux/bootstrap-tools-musl/scripts/unpack-bootstrap-tools.sh pkgs/stdenv/linux/bootstrap-tools/musl/unpack-bootstrap-tools.sh
-24
pkgs/stdenv/linux/bootstrap-tools/default.nix
··· 1 - { system, bootstrapFiles, extraAttrs }: 2 - 3 - derivation ({ 4 - name = "bootstrap-tools"; 5 - 6 - builder = bootstrapFiles.busybox; 7 - 8 - args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ]; 9 - 10 - tarball = bootstrapFiles.bootstrapTools; 11 - 12 - inherit system; 13 - 14 - # Needed by the GCC wrapper. 15 - langC = true; 16 - langCC = true; 17 - isGNU = true; 18 - hardeningUnsupportedFlags = [ 19 - "fortify3" 20 - "stackclashprotection" 21 - "trivialautovarinit" 22 - "zerocallusedregs" 23 - ]; 24 - } // extraAttrs)
+35
pkgs/stdenv/linux/bootstrap-tools/glibc.nix
··· 1 + { 2 + system, 3 + bootstrapFiles, 4 + extraAttrs, 5 + }: 6 + 7 + derivation ( 8 + { 9 + name = "bootstrap-tools"; 10 + 11 + builder = bootstrapFiles.busybox; 12 + 13 + args = [ 14 + "ash" 15 + "-e" 16 + ./glibc/unpack-bootstrap-tools.sh 17 + ]; 18 + 19 + tarball = bootstrapFiles.bootstrapTools; 20 + 21 + inherit system; 22 + 23 + # Needed by the GCC wrapper. 24 + langC = true; 25 + langCC = true; 26 + isGNU = true; 27 + hardeningUnsupportedFlags = [ 28 + "fortify3" 29 + "stackclashprotection" 30 + "trivialautovarinit" 31 + "zerocallusedregs" 32 + ]; 33 + } 34 + // extraAttrs 35 + )
+34
pkgs/stdenv/linux/bootstrap-tools/musl.nix
··· 1 + { 2 + system, 3 + bootstrapFiles, 4 + extraAttrs, 5 + }: 6 + 7 + derivation ( 8 + { 9 + name = "bootstrap-tools"; 10 + 11 + builder = bootstrapFiles.busybox; 12 + 13 + args = [ 14 + "ash" 15 + "-e" 16 + ./musl/unpack-bootstrap-tools.sh 17 + ]; 18 + 19 + tarball = bootstrapFiles.bootstrapTools; 20 + 21 + inherit system; 22 + 23 + # Needed by the GCC wrapper. 24 + langC = true; 25 + langCC = true; 26 + isGNU = true; 27 + hardeningUnsupportedFlags = [ 28 + "fortify3" 29 + "zerocallusedregs" 30 + "trivialautovarinit" 31 + ]; 32 + } 33 + // extraAttrs 34 + )
pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh pkgs/stdenv/linux/bootstrap-tools/glibc/unpack-bootstrap-tools.sh
+1 -1
pkgs/stdenv/linux/default.nix
··· 139 139 140 140 141 141 # Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...). 142 - bootstrapTools = (import (if localSystem.libc == "musl" then ./bootstrap-tools-musl else ./bootstrap-tools) { 142 + bootstrapTools = (import (if localSystem.libc == "musl" then ./bootstrap-tools/musl.nix else ./bootstrap-tools/glibc.nix) { 143 143 inherit system bootstrapFiles; 144 144 extraAttrs = lib.optionalAttrs config.contentAddressedByDefault { 145 145 __contentAddressed = true;
+2 -2
pkgs/stdenv/linux/make-bootstrap-tools.nix
··· 59 59 }; 60 60 in 61 61 if (stdenv.hostPlatform.libc == "glibc") then 62 - import ./bootstrap-tools { 62 + import ./bootstrap-tools/glibc.nix { 63 63 inherit (stdenv.buildPlatform) system; # Used to determine where to build 64 64 inherit bootstrapFiles extraAttrs; 65 65 } 66 66 else if (stdenv.hostPlatform.libc == "musl") then 67 - import ./bootstrap-tools-musl { 67 + import ./bootstrap-tools/musl.nix { 68 68 inherit (stdenv.buildPlatform) system; # Used to determine where to build 69 69 inherit bootstrapFiles extraAttrs; 70 70 }