diff --git a/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix b/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix index d562816c17bd..0f87f9c326bd 100644 --- a/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix +++ b/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix @@ -35,7 +35,24 @@ self: super: { | .main_library.reexported_libraries[].names[] |= select([.] | inside($libs) | not) ' > usr/lib/$libSystem~ # Convert libSystem back to tbd-v4 because not all tooling supports the JSON-based format yet. - llvm-readtapi -delete-input --filetype=tbd-v4 usr/lib/$libSystem~ -o usr/lib/$libSystem + llvm-readtapi --filetype=tbd-v4 usr/lib/$libSystem~ -o usr/lib/$libSystem + rm usr/lib/$libSystem~ done + + # Strip weak C++ symbols to work around `libc++` leakage in system + # frameworks for now. These are only present on `x86_64-darwin`, so + # it should hopefully be harmless. + # + # TODO FIXME: This is kind of horrible. + while read -r -d "" stub; do + printf 'Stripping weak C++ symbols from %s\n' "$stub" + llvm-readtapi --filetype=tbd-v5 "$stub" \ + | jq ' + (.main_library, .libraries[]?).exported_symbols[]?.data.weak[]? |= + select(startswith("__Z") | not) + ' > $stub~ + llvm-readtapi --filetype=tbd-v4 $stub~ -o $stub + rm $stub~ + done < <(find . -name '*.tbd' -print0) ''; } diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 0b57a0bbf336..04e49c7fdcd4 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -88,7 +88,6 @@ enabledModules ? [ ], bzip2, - apple-sdk_14, # earlier SDKs cause linking issues on x86_64 callPackage, }@inputs: @@ -417,7 +416,6 @@ effectiveStdenv.mkDerivation { ] ++ optionals effectiveStdenv.hostPlatform.isDarwin [ bzip2 - apple-sdk_14 ] ++ optionals enableDocs [ doxygen diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 0e55f0944cee..e9be662ab6d4 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -88,7 +88,6 @@ let throw "Please add a qtPlatformCross entry for ${plat.config}"; # Per https://doc.qt.io/qt-5/macos.html#supported-versions: build SDK = 13.x or 14.x. - # SDK 13.x causes weird linking errors on x86_64-darwin, so use 14.x darwinVersionInputs = [ apple-sdk_14 ];