Skip to content

Commit cd36676

Browse files
curl: choose automatically quictl when building with http3 (#351864)
2 parents 71589bc + 97c2bae commit cd36676

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

pkgs/by-name/cu/curlMinimal/package.nix

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
!(isDarwin && (stdenv.buildPlatform != stdenv.hostPlatform))
1515
), libkrb5
1616
, http2Support ? true, nghttp2
17-
, http3Support ? false, nghttp3, ngtcp2
17+
, http3Support ? false, nghttp3, ngtcp2, quictls
1818
, websocketSupport ? false
1919
, idnSupport ? false, libidn2
2020
, ldapSupport ? false, openldap
@@ -47,6 +47,10 @@
4747

4848
assert !((lib.count (x: x) [ gnutlsSupport opensslSupport wolfsslSupport rustlsSupport ]) > 1);
4949

50+
let
51+
openssl' = if http3Support then quictls else openssl;
52+
in
53+
5054
stdenv.mkDerivation (finalAttrs: {
5155
pname = "curl";
5256
version = "8.11.0";
@@ -106,7 +110,7 @@ stdenv.mkDerivation (finalAttrs: {
106110
lib.optionals http3Support [ nghttp3 ngtcp2 ] ++
107111
lib.optional idnSupport libidn2 ++
108112
lib.optional ldapSupport openldap ++
109-
lib.optional opensslSupport openssl ++
113+
lib.optional opensslSupport openssl' ++
110114
lib.optional pslSupport libpsl ++
111115
lib.optional rtmpSupport rtmpdump ++
112116
lib.optional scpSupport libssh2 ++
@@ -150,7 +154,7 @@ stdenv.mkDerivation (finalAttrs: {
150154
(lib.withFeatureAs brotliSupport "brotli" (lib.getDev brotli))
151155
(lib.withFeatureAs gnutlsSupport "gnutls" (lib.getDev gnutls))
152156
(lib.withFeatureAs idnSupport "libidn2" (lib.getDev libidn2))
153-
(lib.withFeatureAs opensslSupport "openssl" (lib.getDev openssl))
157+
(lib.withFeatureAs opensslSupport "openssl" (lib.getDev openssl'))
154158
(lib.withFeatureAs scpSupport "libssh2" (lib.getDev libssh2))
155159
(lib.withFeatureAs wolfsslSupport "wolfssl" (lib.getDev wolfssl))
156160
]
@@ -205,7 +209,8 @@ stdenv.mkDerivation (finalAttrs: {
205209
passthru = let
206210
useThisCurl = attr: attr.override { curl = finalAttrs.finalPackage; };
207211
in {
208-
inherit opensslSupport openssl;
212+
inherit opensslSupport;
213+
openssl = openssl';
209214
tests = {
210215
withCheck = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; });
211216
fetchpatch = tests.fetchpatch.simple.override { fetchpatch = (fetchpatch.override { fetchurl = useThisCurl fetchurl; }) // { version = 1; }; };

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3053,7 +3053,6 @@ with pkgs;
30533053
};
30543054

30553055
curlHTTP3 = curl.override {
3056-
openssl = quictls;
30573056
http3Support = true;
30583057
};
30593058

0 commit comments

Comments
 (0)