···5252 inherit system;
53535454 name = "bootstrap-tools";
5555- builder = bootstrapFiles.sh; # Not a filename! Attribute 'sh' on bootstrapFiles
5656- args = if localSystem.isAarch64 then [ ./unpack-bootstrap-tools-aarch64.sh ] else [ ./unpack-bootstrap-tools.sh ];
5555+ builder = "${bootstrapFiles.unpack}/bin/bash";
5656+5757+ args = [
5858+ "${bootstrapFiles.unpack}/bootstrap-tools-unpack.sh"
5959+ bootstrapFiles.bootstrapTools
6060+ ];
57615858- inherit (bootstrapFiles) mkdir bzip2 cpio tarball;
6262+ PATH = lib.makeBinPath [
6363+ (placeholder "out")
6464+ bootstrapFiles.unpack
6565+ ];
59666067 __impureHostDeps = commonImpureHostDeps;
6168 } // lib.optionalAttrs config.contentAddressedByDefault {
···226233 ccWrapperStdenv = self.stdenv;
227234228235 bash = bootstrapTools;
229229-230236 coreutils = bootstrapTools;
237237+ cpio = bootstrapTools;
231238 gnugrep = bootstrapTools;
232232-233233- # Either pbzx or Libsystem is required from bootstrap tools (one is used building the other).
234234- pbzx = if localSystem.isAarch64 then bootstrapTools else super.pbzx;
235235- cpio = self.stdenv.mkDerivation {
236236- name = "bootstrap-stage0-cpio";
237237- buildCommand = ''
238238- mkdir -p $out/bin
239239- ln -s ${bootstrapFiles.cpio} $out/bin/cpio
240240- '';
241241- passthru.isFromBootstrapFiles = true;
242242- };
239239+ pbzx = bootstrapTools;
243240244241 darwin = super.darwin.overrideScope (selfDarwin: superDarwin: {
245242 # Prevent CF from being propagated to the initial stdenv. Packages that require it
+1-3
pkgs/stdenv/darwin/make-bootstrap-tools.nix
···395395 };
396396397397 # The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it
398398- # TODO: uncomment once https://github.com/NixOS/nixpkgs/issues/222717 is resolved
399399- /*
398398+ # eg: nix-build -A freshBootstrapTools.test-pkgs.stdenv
400399 test-pkgs = import test-pkgspath {
401400 # if the bootstrap tools are for another platform, we should be testing
402401 # that platform.
···406405 args' = args // { inherit bootstrapFiles; };
407406 in (import (test-pkgspath + "/pkgs/stdenv/darwin") args');
408407 };
409409- */
410408}