diff --git a/pkgs/tools/networking/curl/7.79.1-darwin-no-systemconfiguration.patch b/pkgs/tools/networking/curl/7.79.1-darwin-no-systemconfiguration.patch deleted file mode 100644 index 2d97338a1fe9c..0000000000000 --- a/pkgs/tools/networking/curl/7.79.1-darwin-no-systemconfiguration.patch +++ /dev/null @@ -1,53 +0,0 @@ -On darwin, providing SystemConfiguration to curl currently results in a -reference loop, so we have to disable the check for it and the feature -which requires it (NAT64). - -Patching actual configure script here as we also don't want to require -autoconf in the bootstrap loop just to regenerate a patched configure.ac. - ---- a/configure 2021-10-16 00:51:59.000000000 +0100 -+++ b/configure 2021-10-16 01:06:46.000000000 +0100 -@@ -20810,7 +20810,7 @@ - if test "x$build_for_macos" != xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - printf "%s\n" "yes" >&6; } -- LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration" -+ LDFLAGS="$LDFLAGS -framework CoreFoundation" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 - printf "%s\n" "no" >&6; } -@@ -22211,9 +22211,6 @@ - fi - - --if test "$HAVE_GETHOSTBYNAME" != "1"; then -- as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5 --fi - - - curl_includes_winsock2="\ -diff --git a/lib/curl_setup.h b/lib/curl_setup.h -index b43714da7..7674778b7 100644 ---- a/lib/curl_setup.h -+++ b/lib/curl_setup.h -@@ -250,20 +250,6 @@ - - #include - --/* -- * Use getaddrinfo to resolve the IPv4 address literal. If the current network -- * interface doesn't support IPv4, but supports IPv6, NAT64, and DNS64, -- * performing this task will result in a synthesized IPv6 address. -- */ --#if defined(__APPLE__) && !defined(USE_ARES) --#include --#define USE_RESOLVE_ON_IPS 1 --# if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) && \ -- defined(ENABLE_IPV6) --# define CURL_MACOS_CALL_COPYPROXIES 1 --# endif --#endif -- - #ifdef USE_LWIPSOCK - # include - # include diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index aced6d6653a94..8b9c56532ad38 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, perl, nixosTests +{ lib, stdenv, fetchurl, darwin, pkg-config, perl, nixosTests , brotliSupport ? false, brotli , c-aresSupport ? false, c-aresMinimal , gnutlsSupport ? false, gnutls @@ -57,10 +57,6 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-N21id2fWxPBRBattSXsNmrpxEXcN2dmVIlR4IJw36mM="; }; - patches = [ - ./7.79.1-darwin-no-systemconfiguration.patch - ]; - outputs = [ "bin" "dev" "out" "man" "devdoc" ]; separateDebugInfo = stdenv.isLinux; @@ -68,6 +64,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; + buildInputs = lib.optionals stdenv.isDarwin [ darwin.configd ]; nativeBuildInputs = [ pkg-config perl ]; # Zlib and OpenSSL must be propagated because `libcurl.la' contains