···1let
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);
5in
67{
···10 stdenv,
11}:
1213-let
14- disallowedPackages =
15- if jq == null then
16- lib.filter (p: p.package != "corecrypto") disallowedPackages'
17- else
18- disallowedPackages';
19-in
20self: super: {
21 # Remove headers and stubs for packages that are available in nixpkgs.
22 buildPhase =
···1let
2+ disallowedPackages = builtins.fromJSON (builtins.readFile ../metadata/disallowed-packages.json);
003in
45{
···8 stdenv,
9}:
10000000011self: 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 { })
039 ]
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 ]
0000041 # 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}:
1617let
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 };
5758- 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- ];
8384 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 '';
118119 xcodeHash = "sha256-qip/1eiGn8PdLThonhPq3oq2veN4E1zOiamDPBfTeNE=";
···15}:
1617let
000018 # 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 };
5354+ 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+ ];
0007677 prePatch = ''
78 # Copy dyldinfo source files
···97 for header in "''${tapiHeaders[@]}"; do
98 cp ${libtapisrc}/include/tapi/$header subprojects/libtapi/tapi/$header
99 done
0000000000100 '';
101102 xcodeHash = "sha256-qip/1eiGn8PdLThonhPq3oq2veN4E1zOiamDPBfTeNE=";
···85 ### O ###
8687 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})