summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-06-29 20:38:08 -0400
committerRandy Eckenrode <randy@largeandhighquality.com>2023-07-02 17:56:25 -0400
commitebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2 (patch)
treecd1cf844f9033c0630805270b4a002e6548a044a /pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
parent6dbdf283cfe0620578ab198af3569195e0900a11 (diff)
downloadnixpkgs-ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2.tar
nixpkgs-ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2.tar.gz
nixpkgs-ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2.tar.bz2
nixpkgs-ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2.tar.lz
nixpkgs-ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2.tar.xz
nixpkgs-ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2.tar.zst
nixpkgs-ebc1bcf409aa6398eb6da67aa95a5c2a2b944fc2.zip
swift-corelibs: don’t link against libcurl
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.
Diffstat (limited to 'pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix')
-rw-r--r--pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix7
1 files changed, 7 insertions, 0 deletions
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 = ''