diff options
author | Ben Siraphob <bensiraphob@gmail.com> | 2022-04-30 10:58:05 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-30 10:58:05 -0600 |
commit | 02dbca8c2b6df7ef5c827005cbb61f1d4ad99751 (patch) | |
tree | df5c153b95035a5d3f3b13595e80969938e1cb21 /pkgs | |
parent | e6336bdf1049ef0aad6723c5bbe5ce1d6f18797b (diff) | |
parent | 63a37b844cc5e82eb4e963f6fc85b99d2050117f (diff) |
Merge pull request #161270 from Stunkymonkey/darwin-phases
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 75 |
1 files changed, 23 insertions, 52 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 6fbd78c422dad..32e4fe9749ab3 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -98,6 +98,7 @@ rec { doSign = localSystem.isAarch64 && last != null; doUpdateAutoTools = localSystem.isAarch64 && last != null; + inherit (last.pkgs) runCommandLocal; mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" @@ -223,23 +224,15 @@ rec { ''; }; - pbzx = stdenv.mkDerivation { - name = "bootstrap-stage0-pbzx"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/pbzx $out/bin - ''; - }; + pbzx = self.runCommandLocal "bootstrap-stage0-pbzx" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/pbzx $out/bin + ''; - cpio = stdenv.mkDerivation { - name = "bootstrap-stage0-cpio"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapFiles.cpio} $out/bin/cpio - ''; - }; + cpio = self.runCommandLocal "bootstrap-stage0-cpio" { } '' + mkdir -p $out/bin + ln -s ${bootstrapFiles.cpio} $out/bin/cpio + ''; darwin = super.darwin.overrideScope (selfDarwin: superDarwin: { darwin-stubs = superDarwin.darwin-stubs.override { inherit (self) stdenvNoCC fetchurl; }; @@ -253,43 +246,21 @@ rec { ''; }; - sigtool = stdenv.mkDerivation { - name = "bootstrap-stage0-sigtool"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/sigtool $out/bin - - # Rewrite nuked references - sed -e "s|[^( ]*\bsigtool\b|$out/bin/sigtool|g" \ - ${bootstrapTools}/bin/codesign > $out/bin/codesign - chmod a+x $out/bin/codesign - ''; - # on next bootstrap tools update, use the following: - # installPhase = '' - # mkdir -p $out/bin - # ln -s ${bootstrapTools}/bin/sigtool $out/bin - # ln -s ${bootstrapTools}/bin/codesign $out/bin - # ''; - }; + sigtool = self.runCommandLocal "bootstrap-stage0-sigtool" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/sigtool $out/bin + ln -s ${bootstrapTools}/bin/codesign $out/bin + ''; - print-reexports = stdenv.mkDerivation { - name = "bootstrap-stage0-print-reexports"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/print-reexports $out/bin - ''; - }; + print-reexports = self.runCommandLocal "bootstrap-stage0-print-reexports" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/print-reexports $out/bin + ''; - rewrite-tbd = stdenv.mkDerivation { - name = "bootstrap-stage0-rewrite-tbd"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/rewrite-tbd $out/bin - ''; - }; + rewrite-tbd = self.runCommandLocal "bootstrap-stage0-rewrite-tbd" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/rewrite-tbd $out/bin + ''; binutils-unwrapped = { name = "bootstrap-stage0-binutils"; outPath = bootstrapTools; }; @@ -359,7 +330,7 @@ rec { libcxx = stdenv.mkDerivation { name = "bootstrap-stage0-libcxx"; - phases = [ "installPhase" "fixupPhase" ]; + dontUnpack = true; installPhase = '' mkdir -p $out/lib $out/include ln -s ${bootstrapTools}/lib/libc++.dylib $out/lib/libc++.dylib |