linux stdenv: Avoid `assert false`

On one hand, don't want to pass garbage that affects hash, on the other
hand footguns are bad.

Now, factored out the derivation so only need to pass in what is used.

+20 -26
+18
pkgs/stdenv/linux/bootstrap-tools/default.nix
··· 1 + { system, bootstrapFiles }: 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 + }
+1 -16
pkgs/stdenv/linux/default.nix
··· 37 37 38 38 39 39 # Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...). 40 - bootstrapTools = derivation { 41 - name = "bootstrap-tools"; 42 - 43 - builder = bootstrapFiles.busybox; 44 - 45 - args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ]; 46 - 47 - tarball = bootstrapFiles.bootstrapTools; 48 - 49 - inherit system; 50 - 51 - # Needed by the GCC wrapper. 52 - langC = true; 53 - langCC = true; 54 - isGNU = true; 55 - }; 40 + bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; }; 56 41 57 42 58 43 # This function builds the various standard environments used during
+1 -10
pkgs/stdenv/linux/make-bootstrap-tools.nix
··· 173 173 bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz"; 174 174 }; 175 175 176 - bootstrapTools = (import ./default.nix { 177 - inherit system bootstrapFiles; 178 - 179 - lib = assert false; null; 180 - allPackages = assert false; null; 181 - 182 - platform = assert false; null; 183 - crossSystem = null; 184 - config = assert false; null; 185 - }).bootstrapTools; 176 + bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; }; 186 177 187 178 test = derivation { 188 179 name = "test-bootstrap-tools";
pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh