diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index bf01bc98852f8a..e7c104345c21a6 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -14,7 +14,7 @@ !(isDarwin && (stdenv.buildPlatform != stdenv.hostPlatform)) ), libkrb5 , http2Support ? true, nghttp2 -, http3Support ? false, nghttp3, ngtcp2 +, http3Support ? false, nghttp3, ngtcp2, quictls , websocketSupport ? false , idnSupport ? false, libidn2 , ldapSupport ? false, openldap @@ -47,6 +47,10 @@ assert !((lib.count (x: x) [ gnutlsSupport opensslSupport wolfsslSupport rustlsSupport ]) > 1); +let + openssl' = if http3Support then quictls else openssl; +in + stdenv.mkDerivation (finalAttrs: { pname = "curl"; version = "8.9.1"; @@ -97,7 +101,7 @@ stdenv.mkDerivation (finalAttrs: { lib.optionals http3Support [ nghttp3 ngtcp2 ] ++ lib.optional idnSupport libidn2 ++ lib.optional ldapSupport openldap ++ - lib.optional opensslSupport openssl ++ + lib.optional opensslSupport openssl' ++ lib.optional pslSupport libpsl ++ lib.optional rtmpSupport rtmpdump ++ lib.optional scpSupport libssh2 ++ @@ -141,7 +145,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.withFeatureAs brotliSupport "brotli" (lib.getDev brotli)) (lib.withFeatureAs gnutlsSupport "gnutls" (lib.getDev gnutls)) (lib.withFeatureAs idnSupport "libidn2" (lib.getDev libidn2)) - (lib.withFeatureAs opensslSupport "openssl" (lib.getDev openssl)) + (lib.withFeatureAs opensslSupport "openssl" (lib.getDev openssl')) (lib.withFeatureAs scpSupport "libssh2" (lib.getDev libssh2)) (lib.withFeatureAs wolfsslSupport "wolfssl" (lib.getDev wolfssl)) ] @@ -196,7 +200,8 @@ stdenv.mkDerivation (finalAttrs: { passthru = let useThisCurl = attr: attr.override { curl = finalAttrs.finalPackage; }; in { - inherit opensslSupport openssl; + inherit opensslSupport; + openssl = openssl'; tests = { withCheck = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; }); fetchpatch = tests.fetchpatch.simple.override { fetchpatch = (fetchpatch.override { fetchurl = useThisCurl fetchurl; }) // { version = 1; }; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c39a5cd60f631..ce5d04b33f144a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6712,7 +6712,6 @@ with pkgs; }; curlHTTP3 = curl.override { - openssl = quictls; http3Support = true; };