darwin: deprecate phases

This commit is contained in:
Felix Buehler 2022-02-21 19:58:30 +01:00
parent 401b713075
commit 63a37b844c

View File

@ -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
sigtool = self.runCommandLocal "bootstrap-stage0-sigtool" { } ''
mkdir -p $out/bin
ln -s ${bootstrapTools}/bin/sigtool $out/bin
ln -s ${bootstrapTools}/bin/codesign $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
# '';
};
print-reexports = self.runCommandLocal "bootstrap-stage0-print-reexports" { } ''
mkdir -p $out/bin
ln -s ${bootstrapTools}/bin/print-reexports $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
'';
};
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