|
14 | 14 | !(isDarwin && (stdenv.buildPlatform != stdenv.hostPlatform)) |
15 | 15 | ), libkrb5 |
16 | 16 | , http2Support ? true, nghttp2 |
17 | | -, http3Support ? false, nghttp3, ngtcp2 |
| 17 | +, http3Support ? false, nghttp3, ngtcp2, quictls |
18 | 18 | , websocketSupport ? false |
19 | 19 | , idnSupport ? false, libidn2 |
20 | 20 | , ldapSupport ? false, openldap |
|
47 | 47 |
|
48 | 48 | assert !((lib.count (x: x) [ gnutlsSupport opensslSupport wolfsslSupport rustlsSupport ]) > 1); |
49 | 49 |
|
| 50 | +let |
| 51 | + openssl' = if http3Support then quictls else openssl; |
| 52 | +in |
| 53 | + |
50 | 54 | stdenv.mkDerivation (finalAttrs: { |
51 | 55 | pname = "curl"; |
52 | 56 | version = "8.11.0"; |
@@ -106,7 +110,7 @@ stdenv.mkDerivation (finalAttrs: { |
106 | 110 | lib.optionals http3Support [ nghttp3 ngtcp2 ] ++ |
107 | 111 | lib.optional idnSupport libidn2 ++ |
108 | 112 | lib.optional ldapSupport openldap ++ |
109 | | - lib.optional opensslSupport openssl ++ |
| 113 | + lib.optional opensslSupport openssl' ++ |
110 | 114 | lib.optional pslSupport libpsl ++ |
111 | 115 | lib.optional rtmpSupport rtmpdump ++ |
112 | 116 | lib.optional scpSupport libssh2 ++ |
@@ -150,7 +154,7 @@ stdenv.mkDerivation (finalAttrs: { |
150 | 154 | (lib.withFeatureAs brotliSupport "brotli" (lib.getDev brotli)) |
151 | 155 | (lib.withFeatureAs gnutlsSupport "gnutls" (lib.getDev gnutls)) |
152 | 156 | (lib.withFeatureAs idnSupport "libidn2" (lib.getDev libidn2)) |
153 | | - (lib.withFeatureAs opensslSupport "openssl" (lib.getDev openssl)) |
| 157 | + (lib.withFeatureAs opensslSupport "openssl" (lib.getDev openssl')) |
154 | 158 | (lib.withFeatureAs scpSupport "libssh2" (lib.getDev libssh2)) |
155 | 159 | (lib.withFeatureAs wolfsslSupport "wolfssl" (lib.getDev wolfssl)) |
156 | 160 | ] |
@@ -205,7 +209,8 @@ stdenv.mkDerivation (finalAttrs: { |
205 | 209 | passthru = let |
206 | 210 | useThisCurl = attr: attr.override { curl = finalAttrs.finalPackage; }; |
207 | 211 | in { |
208 | | - inherit opensslSupport openssl; |
| 212 | + inherit opensslSupport; |
| 213 | + openssl = openssl'; |
209 | 214 | tests = { |
210 | 215 | withCheck = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; }); |
211 | 216 | fetchpatch = tests.fetchpatch.simple.override { fetchpatch = (fetchpatch.override { fetchurl = useThisCurl fetchurl; }) // { version = 1; }; }; |
|
0 commit comments