From ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Thu, 29 Jun 2023 20:38:08 -0400 Subject: swift-corelibs: don’t link against libcurl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit swift-corelibs uses libcurl to implement `NSURLSession` in Foundation via the symbols exported by CF. Foundation is not build on Darwin, and these symbols are not exported by the system CoreFoundation. By not linking against libcurl, this breaks a cycle between CF and libcurl. That should allow libcurl to drop the patch disabling linking against the SystemConfiguration and restore NAT64 support. Unfortunately, the Darwin stdenv bootstrap still needs to build dependencies that use `fetchFromGitHub`. While it can drop curl from the final stdenv, it still needs to use it during the stdenv bootstrap. --- pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix') diff --git a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix index 90282b391d9..5bd3e201056 100644 --- a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix +++ b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix @@ -40,6 +40,13 @@ stdenv.mkDerivation { ./0006-System-CF-framework-compatibility.patch # Link against the nixpkgs ICU instead of using Apple’s vendored version. ./0007-Use-nixpkgs-icu.patch + # Don’t link against libcurl. This breaks a cycle between CF and curl, which depends on CF and + # uses the SystemConfiguration framework to support NAT64. + # This is safe because the symbols provided in CFURLSessionInterface are not provided by the + # system CoreFoundation. They are meant to be used by the implementation of `NSURLSession` in + # swift-corelibs-foundation, which is not built because it is not fully compatible with the + # system Foundation used on Darwin. + ./0008-Dont-link-libcurl.patch ]; postPatch = '' -- cgit 1.4.1