pkgs/stdenv/darwin: bootstrap Darwin using update tools (#384254)

authored by

Randy Eckenrode and committed by
GitHub
e5182111 b0f809f1

+62 -178
+1 -10
pkgs/by-name/ap/apple-sdk/common/remove-disallowed-packages.nix
··· 1 let 2 - # This can be made unconditional once jq is available in the bootstrap tools. If corecrypto is not removed from 3 - # the umbrella framework, linking will fail in stage 1 because it can’t find the tbd. 4 - disallowedPackages' = builtins.fromJSON (builtins.readFile ../metadata/disallowed-packages.json); 5 in 6 7 { ··· 10 stdenv, 11 }: 12 13 - let 14 - disallowedPackages = 15 - if jq == null then 16 - lib.filter (p: p.package != "corecrypto") disallowedPackages' 17 - else 18 - disallowedPackages'; 19 - in 20 self: super: { 21 # Remove headers and stubs for packages that are available in nixpkgs. 22 buildPhase =
··· 1 let 2 + disallowedPackages = builtins.fromJSON (builtins.readFile ../metadata/disallowed-packages.json); 3 in 4 5 { ··· 8 stdenv, 9 }: 10 11 self: super: { 12 # Remove headers and stubs for packages that are available in nixpkgs. 13 buildPhase =
+1 -5
pkgs/by-name/ap/apple-sdk/package.nix
··· 36 (callPackage ./common/passthru-private-frameworks.nix { inherit sdkVersion; }) 37 (callPackage ./common/passthru-source-release-files.nix { inherit sdkVersion; }) 38 (callPackage ./common/remove-disallowed-packages.nix { }) 39 ] 40 - # Only process stubs and convert them to tbd-v4 if jq is available. This can be made unconditional once 41 - # the bootstrap tools have jq and llvm-readtapi. 42 - ++ lib.optional (jq != null && lib.getName llvm != "bootstrap-stage0-llvm") ( 43 - callPackage ./common/process-stubs.nix { } 44 - ) 45 # Avoid infinite recursions by not propagating certain packages, so they can themselves build with the SDK. 46 ++ lib.optionals (!enableBootstrap) [ 47 (callPackage ./common/propagate-inputs.nix { })
··· 36 (callPackage ./common/passthru-private-frameworks.nix { inherit sdkVersion; }) 37 (callPackage ./common/passthru-source-release-files.nix { inherit sdkVersion; }) 38 (callPackage ./common/remove-disallowed-packages.nix { }) 39 + (callPackage ./common/process-stubs.nix { }) 40 ] 41 # Avoid infinite recursions by not propagating certain packages, so they can themselves build with the SDK. 42 ++ lib.optionals (!enableBootstrap) [ 43 (callPackage ./common/propagate-inputs.nix { })
+22 -39
pkgs/by-name/ld/ld64/package.nix
··· 15 }: 16 17 let 18 - # ld64 uses `#embed` to embed `compile_stubs`, which is only implemented in Clang 19. 19 - # This can be done unconditionally once the bootstrap tools have been updated. 20 - hasEmbed = lib.versionAtLeast (lib.getVersion stdenv.cc) "19"; 21 - 22 # Copy the files from their original sources instead of using patches to reduce the size of the patch set in nixpkgs. 23 otherSrcs = { 24 # The last version of ld64 to have dyldinfo ··· 55 hash = "sha256-CVIyL2J9ISZnI4+r+wp4QtOb3+3Tmz2z2Z7/qeRqHS0="; 56 }; 57 58 - patches = 59 - [ 60 - # These patches are vendored from https://github.com/reckenrode/ld64/tree/ld64-951.9-nixpkgs. 61 - # See their comments for more on what they do. 62 - ./patches/0001-Always-use-write-instead-of-mmap.patch 63 - ./patches/0003-Inline-missing-definitions-instead-of-using-private-.patch 64 - ./patches/0004-Removed-unused-Blob-clone-method.patch 65 - ./patches/0005-Use-std-atomics-and-std-mutex-for-portability.patch 66 - ./patches/0006-Add-Meson-build-system.patch 67 - ./patches/0007-Add-CrashReporterClient-header.patch 68 - ./patches/0008-Provide-mach-compatibility-headers-based-on-LLVM-s-h.patch 69 - ./patches/0009-Support-LTO-in-nixpkgs.patch 70 - ./patches/0010-Add-vendored-libtapi-to-the-ld64-build.patch 71 - ./patches/0011-Modify-vendored-libtapi-to-build-with-upstream-LLVM.patch 72 - ./patches/0012-Move-libcodedirectory-to-its-own-subproject.patch 73 - ./patches/0013-Set-the-version-string-in-the-build.patch 74 - ./patches/0014-Replace-corecrypto-and-CommonCrypto-with-OpenSSL.patch 75 - ./patches/0015-Add-libcd_is_blob_a_linker_signature-implementation.patch 76 - ./patches/0016-Add-dyldinfo-to-the-ld64-build.patch 77 - ./patches/0017-Fix-dyldinfo-build.patch 78 - ./patches/0018-Use-STL-containers-instead-of-LLVM-containers.patch 79 - ] 80 - ++ lib.optionals (hasEmbed) [ 81 - ./patches/0002-Add-compile_stubs.h-using-Clang-s-embed-extension-fo.patch 82 - ]; 83 84 prePatch = '' 85 # Copy dyldinfo source files ··· 104 for header in "''${tapiHeaders[@]}"; do 105 cp ${libtapisrc}/include/tapi/$header subprojects/libtapi/tapi/$header 106 done 107 - ''; 108 - 109 - # Clang 16 doesn’t support C23, but the patchset expects a compiler that supports it. Only `#embed` is used, so stub 110 - # out its usage and request an older C standard version. This can be dropped once the bootstrap tools are updated. 111 - postPatch = lib.optionalString (!hasEmbed) '' 112 - for meson_build in meson.build subprojects/libcodedirectory/meson.build subprojects/libtapi/meson.build; do 113 - substituteInPlace $meson_build --replace-fail c23 c2x 114 - done 115 - echo '#pragma once' > src/ld/compile_stubs.h 116 - echo 'static const char compile_stubs[] = "";' >> src/ld/compile_stubs.h 117 ''; 118 119 xcodeHash = "sha256-qip/1eiGn8PdLThonhPq3oq2veN4E1zOiamDPBfTeNE=";
··· 15 }: 16 17 let 18 # Copy the files from their original sources instead of using patches to reduce the size of the patch set in nixpkgs. 19 otherSrcs = { 20 # The last version of ld64 to have dyldinfo ··· 51 hash = "sha256-CVIyL2J9ISZnI4+r+wp4QtOb3+3Tmz2z2Z7/qeRqHS0="; 52 }; 53 54 + patches = [ 55 + # These patches are vendored from https://github.com/reckenrode/ld64/tree/ld64-951.9-nixpkgs. 56 + # See their comments for more on what they do. 57 + ./patches/0001-Always-use-write-instead-of-mmap.patch 58 + ./patches/0002-Add-compile_stubs.h-using-Clang-s-embed-extension-fo.patch 59 + ./patches/0003-Inline-missing-definitions-instead-of-using-private-.patch 60 + ./patches/0004-Removed-unused-Blob-clone-method.patch 61 + ./patches/0005-Use-std-atomics-and-std-mutex-for-portability.patch 62 + ./patches/0006-Add-Meson-build-system.patch 63 + ./patches/0007-Add-CrashReporterClient-header.patch 64 + ./patches/0008-Provide-mach-compatibility-headers-based-on-LLVM-s-h.patch 65 + ./patches/0009-Support-LTO-in-nixpkgs.patch 66 + ./patches/0010-Add-vendored-libtapi-to-the-ld64-build.patch 67 + ./patches/0011-Modify-vendored-libtapi-to-build-with-upstream-LLVM.patch 68 + ./patches/0012-Move-libcodedirectory-to-its-own-subproject.patch 69 + ./patches/0013-Set-the-version-string-in-the-build.patch 70 + ./patches/0014-Replace-corecrypto-and-CommonCrypto-with-OpenSSL.patch 71 + ./patches/0015-Add-libcd_is_blob_a_linker_signature-implementation.patch 72 + ./patches/0016-Add-dyldinfo-to-the-ld64-build.patch 73 + ./patches/0017-Fix-dyldinfo-build.patch 74 + ./patches/0018-Use-STL-containers-instead-of-LLVM-containers.patch 75 + ]; 76 77 prePatch = '' 78 # Copy dyldinfo source files ··· 97 for header in "''${tapiHeaders[@]}"; do 98 cp ${libtapisrc}/include/tapi/$header subprojects/libtapi/tapi/$header 99 done 100 ''; 101 102 xcodeHash = "sha256-qip/1eiGn8PdLThonhPq3oq2veN4E1zOiamDPBfTeNE=";
-4
pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix
··· 78 --replace-fail '__ptrcheck_abi_assume_single()' "" \ 79 --replace-fail '__unsafe_indexable' "" 80 done 81 - 82 - # clang 16 does not support C23 empty initializers. This can be removed once the bootstrap tools are updated. 83 - substituteInPlace copyfile.c \ 84 - --replace-fail 'filesec_t fsec_tmp = {};' 'filesec_t fsec_tmp = {0};' 85 ''; 86 87 env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include";
··· 78 --replace-fail '__ptrcheck_abi_assume_single()' "" \ 79 --replace-fail '__unsafe_indexable' "" 80 done 81 ''; 82 83 env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include";
+9 -9
pkgs/stdenv/darwin/bootstrap-files/aarch64-apple-darwin.nix
··· 2 # $ ./refresh-tarballs.bash --targets=aarch64-apple-darwin 3 # 4 # Metadata: 5 - # - nixpkgs revision: d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f 6 # - hydra build: https://hydra.nixos.org/job/nixpkgs/trunk/stdenvBootstrapTools.aarch64-apple-darwin.build/latest 7 - # - resolved hydra build: https://hydra.nixos.org/build/255282138 8 - # - instantiated derivation: /nix/store/cahnprnkg9z2aij3hj4rkbkc4l8190mf-stdenv-bootstrap-tools.drv 9 - # - output directory: /nix/store/zxxcz7sza5ypy061rsg7cmr7h0a96hbb-stdenv-bootstrap-tools 10 - # - build time: Wed, 03 Apr 2024 07:59:44 +0000 11 { 12 bootstrapTools = import <nix/fetchurl.nix> { 13 - url = "http://tarballs.nixos.org/stdenv/aarch64-apple-darwin/d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f/bootstrap-tools.tar.xz"; 14 - hash = "sha256-a37OgMdTHjFyKs4UTxoD7zx6Te3A7zsSjhbFHzbNxQ8="; 15 }; 16 unpack = import <nix/fetchurl.nix> { 17 - url = "http://tarballs.nixos.org/stdenv/aarch64-apple-darwin/d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f/unpack.nar.xz"; 18 - hash = "sha256-XCVy6TMDJ1DKFnhIT1NHzdQUjY/TPKLV67Zi/ANIpms="; 19 name = "unpack"; 20 unpack = true; 21 };
··· 2 # $ ./refresh-tarballs.bash --targets=aarch64-apple-darwin 3 # 4 # Metadata: 5 + # - nixpkgs revision: d8657587c0c1ce2191b4b489299c386b5b7148c6 6 # - hydra build: https://hydra.nixos.org/job/nixpkgs/trunk/stdenvBootstrapTools.aarch64-apple-darwin.build/latest 7 + # - resolved hydra build: https://hydra.nixos.org/build/290554342 8 + # - instantiated derivation: /nix/store/g4x0vd6rfvr124sbxqfphkf8l06sy4pc-stdenv-bootstrap-tools.drv 9 + # - output directory: /nix/store/8wbnh6accpx3fcf20jvbnapcalvm1cmd-stdenv-bootstrap-tools 10 + # - build time: Thu, 20 Feb 2025 12:38:34 +0000 11 { 12 bootstrapTools = import <nix/fetchurl.nix> { 13 + url = "http://tarballs.nixos.org/stdenv/aarch64-apple-darwin/d8657587c0c1ce2191b4b489299c386b5b7148c6/bootstrap-tools.tar.xz"; 14 + hash = "sha256-i+KwTIY6P3dKfNmE42BWC9+qUomoDxazO50uvrzNlpE="; 15 }; 16 unpack = import <nix/fetchurl.nix> { 17 + url = "http://tarballs.nixos.org/stdenv/aarch64-apple-darwin/d8657587c0c1ce2191b4b489299c386b5b7148c6/unpack.nar.xz"; 18 + hash = "sha256-mzql+dmvqtn663HvzWZORA8f9d9RPShwPJNIk9VGEvU="; 19 name = "unpack"; 20 unpack = true; 21 };
+9 -9
pkgs/stdenv/darwin/bootstrap-files/x86_64-apple-darwin.nix
··· 2 # $ ./refresh-tarballs.bash --targets=x86_64-apple-darwin 3 # 4 # Metadata: 5 - # - nixpkgs revision: d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f 6 # - hydra build: https://hydra.nixos.org/job/nixpkgs/trunk/stdenvBootstrapTools.x86_64-apple-darwin.build/latest 7 - # - resolved hydra build: https://hydra.nixos.org/build/255281731 8 - # - instantiated derivation: /nix/store/44wnr0ikrbcxkakfqhhm2cz6gsh6wjni-stdenv-bootstrap-tools.drv 9 - # - output directory: /nix/store/lsl9rl3zj9nr318w471vvmlvxzj21b2k-stdenv-bootstrap-tools 10 - # - build time: Wed, 03 Apr 2024 07:56:15 +0000 11 { 12 bootstrapTools = import <nix/fetchurl.nix> { 13 - url = "http://tarballs.nixos.org/stdenv/x86_64-apple-darwin/d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f/bootstrap-tools.tar.xz"; 14 - hash = "sha256-3OBigzlbu/Z6g8r7hsOWg95HTv7IJw9Nvbamwvw+88w="; 15 }; 16 unpack = import <nix/fetchurl.nix> { 17 - url = "http://tarballs.nixos.org/stdenv/x86_64-apple-darwin/d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f/unpack.nar.xz"; 18 - hash = "sha256-93GK8LjjgUBknxsylfGVr0DG4AbWVIQEIWrwxhDW07k="; 19 name = "unpack"; 20 unpack = true; 21 };
··· 2 # $ ./refresh-tarballs.bash --targets=x86_64-apple-darwin 3 # 4 # Metadata: 5 + # - nixpkgs revision: d8657587c0c1ce2191b4b489299c386b5b7148c6 6 # - hydra build: https://hydra.nixos.org/job/nixpkgs/trunk/stdenvBootstrapTools.x86_64-apple-darwin.build/latest 7 + # - resolved hydra build: https://hydra.nixos.org/build/290554343 8 + # - instantiated derivation: /nix/store/38sk9c8s4zyhjrifcr9cd3a8d9hyi4zj-stdenv-bootstrap-tools.drv 9 + # - output directory: /nix/store/y617yisg19x2pj34hzxg9zcm3wlsfj29-stdenv-bootstrap-tools 10 + # - build time: Thu, 20 Feb 2025 12:38:34 +0000 11 { 12 bootstrapTools = import <nix/fetchurl.nix> { 13 + url = "http://tarballs.nixos.org/stdenv/x86_64-apple-darwin/d8657587c0c1ce2191b4b489299c386b5b7148c6/bootstrap-tools.tar.xz"; 14 + hash = "sha256-gtkeaUaV8ZXY8JxEkyd7ZeB75MESpsBPjaux0B2c0lE="; 15 }; 16 unpack = import <nix/fetchurl.nix> { 17 + url = "http://tarballs.nixos.org/stdenv/x86_64-apple-darwin/d8657587c0c1ce2191b4b489299c386b5b7148c6/unpack.nar.xz"; 18 + hash = "sha256-vgfZGKo6I565ORLZ/AGKh6SUpgLhgaanFuhYk897+zw="; 19 name = "unpack"; 20 unpack = true; 21 };
+17 -83
pkgs/stdenv/darwin/default.nix
··· 126 ln -s "${compiler-rt.out}/lib" "$rsrc/lib" 127 ln -s "${compiler-rt.out}/share" "$rsrc/share" 128 echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags 129 - '' 130 - + lib.optionalString (isFromBootstrapFiles prevStage.llvmPackages.clang-unwrapped) '' 131 - # Work around the `-nostdlibinc` patch in the bootstrap tools. 132 - # TODO: Remove after the bootstrap tools have been updated. 133 - substituteAll ${builtins.toFile "add-flags-extra.sh" '' 134 - if [ "@darwinMinVersion@" ]; then 135 - NIX_CFLAGS_COMPILE_@suffixSalt@+=" -idirafter $SDKROOT/usr/include" 136 - NIX_CFLAGS_COMPILE_@suffixSalt@+=" -iframework $SDKROOT/System/Library/Frameworks" 137 - fi 138 - ''} add-flags-extra.sh 139 - cat add-flags-extra.sh >> $out/nix-support/add-flags.sh 140 ''; 141 142 cc = prevStage.llvmPackages.clang-unwrapped; ··· 332 libxml2 333 libxo 334 ncurses 335 - openbsm 336 openpam 337 xcbuild 338 zlib ··· 417 gnugrep = bootstrapTools; 418 pbzx = bootstrapTools; 419 420 - jq = null; 421 422 cctools = bootstrapTools // { 423 libtool = bootstrapTools; ··· 446 runtimeShell = self.stdenvNoCC.shell; 447 448 bintools = selfDarwin.binutils-unwrapped; 449 - 450 - # Bootstrap tools cctools needs the hook and wrappers to make sure things are signed properly, 451 - # and additional linker flags to work around a since‐removed patch. 452 - # This can be dropped once the bootstrap tools cctools has been updated to 1010.6. 453 - extraBuildCommands = '' 454 - printf %s ${lib.escapeShellArg '' 455 - extraBefore+=("-F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks") 456 - extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib") 457 - ''} >> $out/nix-support/add-local-ldflags-before.sh 458 - 459 - echo 'source ${selfDarwin.postLinkSignHook}' >> $out/nix-support/post-link-hook 460 - 461 - export signingUtils=${selfDarwin.signingUtils} 462 - 463 - wrap \ 464 - install_name_tool ${../../build-support/bintools-wrapper/darwin-install_name_tool-wrapper.sh} \ 465 - "${selfDarwin.binutils-unwrapped}/bin/install_name_tool" 466 - 467 - wrap \ 468 - strip ${../../build-support/bintools-wrapper/darwin-strip-wrapper.sh} \ 469 - "${selfDarwin.binutils-unwrapped}/bin/strip" 470 - ''; 471 }; 472 473 binutils-unwrapped = ··· 537 fi 538 done 539 ln -s ${bootstrapTools}/bin/dsymutil $out/bin/dsymutil 540 ln -s ${bootstrapTools}/lib/libLLVM* $out/lib 541 ''; 542 passthru.isFromBootstrapFiles = true; ··· 680 selfDarwin: superDarwin: { 681 signingUtils = prevStage.darwin.signingUtils.override { inherit (selfDarwin) sigtool; }; 682 683 - postLinkSignHook = prevStage.darwin.postLinkSignHook.override { inherit (selfDarwin) sigtool; }; 684 - 685 # Rewrap binutils with the real libSystem 686 binutils = superDarwin.binutils.override { 687 inherit (self) coreutils; 688 bintools = selfDarwin.binutils-unwrapped; 689 libc = selfDarwin.libSystem; 690 - 691 - # Bootstrap tools cctools needs the hook and wrappers to make sure things are signed properly. 692 - # This can be dropped once the bootstrap tools cctools has been updated to 1010.6. 693 - extraBuildCommands = '' 694 - printf %s ${lib.escapeShellArg '' 695 - extraBefore+=("-F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks") 696 - extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib") 697 - ''} >> $out/nix-support/add-local-ldflags-before.sh 698 - 699 - echo 'source ${selfDarwin.postLinkSignHook}' >> $out/nix-support/post-link-hook 700 - 701 - export signingUtils=${selfDarwin.signingUtils} 702 - 703 - wrap \ 704 - install_name_tool ${../../build-support/bintools-wrapper/darwin-install_name_tool-wrapper.sh} \ 705 - "${selfDarwin.binutils-unwrapped}/bin/install_name_tool" 706 - 707 - wrap \ 708 - strip ${../../build-support/bintools-wrapper/darwin-strip-wrapper.sh} \ 709 - "${selfDarwin.binutils-unwrapped}/bin/strip" 710 - ''; 711 }; 712 713 # Avoid building unnecessary Python dependencies due to building LLVM manpages. ··· 941 # Rebuild darwin.binutils with the new LLVM, so only inherit libSystem from the previous stage. 942 // { 943 inherit (prevStage.darwin) libSystem; 944 } 945 ); 946 947 llvmPackages = 948 let 949 - tools = super.llvmPackages.tools.extend ( 950 - _: superTools: { 951 - # darwin.binutils-unwrapped needs to build the LLVM man pages, which requires a lot of Python stuff 952 - # that ultimately ends up depending on git. Fortunately, the git dependency is only for check 953 - # inputs. The following set of overrides allow the LLVM documentation to be built without 954 - # pulling curl (and other packages like ffmpeg) into the stdenv bootstrap. 955 - # 956 - # However, even without darwin.binutils-unwrapped, this has to be overridden in the LLVM package set 957 - # because otherwise llvmPackages.llvm-manpages on its own is broken. 958 - llvm-manpages = superTools.llvm-manpages.override { 959 - python3Packages = self.python3.pkgs.overrideScope ( 960 - _: superPython: { 961 - hatch-vcs = superPython.hatch-vcs.overrideAttrs { doInstallCheck = false; }; 962 - markdown-it-py = superPython.markdown-it-py.overrideAttrs { doInstallCheck = false; }; 963 - mdit-py-plugins = superPython.mdit-py-plugins.overrideAttrs { doInstallCheck = false; }; 964 - myst-parser = superPython.myst-parser.overrideAttrs { doInstallCheck = false; }; 965 - } 966 - ); 967 - }; 968 - } 969 - ); 970 libraries = super.llvmPackages.libraries.extend (_: _: llvmLibrariesPackages prevStage); 971 in 972 - super.llvmPackages // { inherit tools libraries; } // tools // libraries; 973 } 974 ]; 975 ··· 1200 ncurses.dev 1201 ncurses.man 1202 ncurses.out 1203 - openbsm 1204 openpam 1205 openssl.out 1206 patch ··· 1264 patch 1265 ; 1266 1267 - # TODO: Simplify when dropping support for macOS < 11. 1268 - "apple-sdk_${builtins.replaceStrings [ "." ] [ "_" ] sdkMajorVersion}" = self.apple-sdk; 1269 1270 darwin = super.darwin.overrideScope ( 1271 _: _: ··· 1297 libraries = super."llvmPackages_${llvmVersion}".libraries.extend ( 1298 _: _: 1299 llvmLibrariesPackages prevStage 1300 // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { 1301 inherit (prevStage.llvmPackages) clang; 1302 }
··· 126 ln -s "${compiler-rt.out}/lib" "$rsrc/lib" 127 ln -s "${compiler-rt.out}/share" "$rsrc/share" 128 echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags 129 ''; 130 131 cc = prevStage.llvmPackages.clang-unwrapped; ··· 321 libxml2 322 libxo 323 ncurses 324 openpam 325 xcbuild 326 zlib ··· 405 gnugrep = bootstrapTools; 406 pbzx = bootstrapTools; 407 408 + jq = bootstrapTools; 409 410 cctools = bootstrapTools // { 411 libtool = bootstrapTools; ··· 434 runtimeShell = self.stdenvNoCC.shell; 435 436 bintools = selfDarwin.binutils-unwrapped; 437 }; 438 439 binutils-unwrapped = ··· 503 fi 504 done 505 ln -s ${bootstrapTools}/bin/dsymutil $out/bin/dsymutil 506 + ln -s ${bootstrapTools}/bin/llvm-readtapi $out/bin/llvm-readtapi 507 ln -s ${bootstrapTools}/lib/libLLVM* $out/lib 508 ''; 509 passthru.isFromBootstrapFiles = true; ··· 647 selfDarwin: superDarwin: { 648 signingUtils = prevStage.darwin.signingUtils.override { inherit (selfDarwin) sigtool; }; 649 650 # Rewrap binutils with the real libSystem 651 binutils = superDarwin.binutils.override { 652 inherit (self) coreutils; 653 bintools = selfDarwin.binutils-unwrapped; 654 libc = selfDarwin.libSystem; 655 }; 656 657 # Avoid building unnecessary Python dependencies due to building LLVM manpages. ··· 885 # Rebuild darwin.binutils with the new LLVM, so only inherit libSystem from the previous stage. 886 // { 887 inherit (prevStage.darwin) libSystem; 888 + 889 + # Disable building the documentation due to the dependency on llvm-manpages, 890 + # which brings in a bunch of Python dependencies. 891 + binutils-unwrapped = superDarwin.binutils-unwrapped.override { 892 + inherit (self) cctools ld64; 893 + enableManpages = false; 894 + }; 895 } 896 ); 897 898 llvmPackages = 899 let 900 libraries = super.llvmPackages.libraries.extend (_: _: llvmLibrariesPackages prevStage); 901 in 902 + super.llvmPackages // { inherit libraries; } // libraries; 903 } 904 ]; 905 ··· 1130 ncurses.dev 1131 ncurses.man 1132 ncurses.out 1133 openpam 1134 openssl.out 1135 patch ··· 1193 patch 1194 ; 1195 1196 + "apple-sdk_${sdkMajorVersion}" = self.apple-sdk; 1197 1198 darwin = super.darwin.overrideScope ( 1199 _: _: ··· 1225 libraries = super."llvmPackages_${llvmVersion}".libraries.extend ( 1226 _: _: 1227 llvmLibrariesPackages prevStage 1228 + # Avoid depending on llvm-manpages from the bootstrap, which brings a bunch of Python dependencies 1229 + # into the bootstrap. This means that there are no man pages in darwin.binutils, but they are still 1230 + # available from llvm-manpages, ld64, and cctools. 1231 + // { 1232 + inherit (super."llvmPackages_${llvmVersion}") llvm-manpages; 1233 + } 1234 // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { 1235 inherit (prevStage.llvmPackages) clang; 1236 }
+3
pkgs/top-level/darwin-aliases.nix
··· 85 ### O ### 86 87 opencflite = pkgs.opencflite; # added 2024-05-02 88 })
··· 85 ### O ### 86 87 opencflite = pkgs.opencflite; # added 2024-05-02 88 + 89 + ### P ### 90 + postLinkSignHook = throw "'darwin.postLinkSignHook' has been removed because it is obsolete"; # added 2025-02-23 91 })
-2
pkgs/top-level/darwin-packages.nix
··· 192 193 signingUtils = callPackage ../os-specific/darwin/signing-utils { }; 194 195 - postLinkSignHook = callPackage ../os-specific/darwin/signing-utils/post-link-sign-hook.nix { }; 196 - 197 autoSignDarwinBinariesHook = pkgs.makeSetupHook { 198 name = "auto-sign-darwin-binaries-hook"; 199 propagatedBuildInputs = [ self.signingUtils ];
··· 192 193 signingUtils = callPackage ../os-specific/darwin/signing-utils { }; 194 195 autoSignDarwinBinariesHook = pkgs.makeSetupHook { 196 name = "auto-sign-darwin-binaries-hook"; 197 propagatedBuildInputs = [ self.signingUtils ];