@@ -5,6 +5,7 @@
55, zlibSupport ? true, zlib ? null
66, sslSupport ? zlibSupport, openssl ? null
77, gnutlsSupport ? false, gnutls ? null
8+, wolfsslSupport ? false, wolfssl ? null
89, scpSupport ? zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin, libssh2 ? null
910, gssSupport ? !stdenv.hostPlatform.isWindows, libkrb5 ? null
1011, c-aresSupport ? false, c-ares ? null
@@ -17,7 +18,10 @@ assert ldapSupport -> openldap != null;
1718assert zlibSupport -> zlib != null;
1819assert sslSupport -> openssl != null;
1920assert !(gnutlsSupport && sslSupport);
21+assert !(gnutlsSupport && wolfsslSupport);
22+assert !(sslSupport && wolfsslSupport);
2023assert gnutlsSupport -> gnutls != null;
24+assert wolfsslSupport -> wolfssl != null;
2125assert scpSupport -> libssh2 != null;
2226assert c-aresSupport -> c-ares != null;
2327assert brotliSupport -> brotli != null;
@@ -53,6 +57,7 @@ stdenv.mkDerivation rec {
5357 optional c-aresSupport c-ares ++
5458 optional sslSupport openssl ++
5559 optional gnutlsSupport gnutls ++
60+ optional wolfsslSupport wolfssl ++
5661 optional scpSupport libssh2 ++
5762 optional brotliSupport brotli;
5863
@@ -67,7 +72,8 @@ stdenv.mkDerivation rec {
6772 # to nss-cacert from the default profile.
6873 "--without-ca-bundle"
6974 "--without-ca-path"
70− "--with-ca-fallback"
75+ # The build fails when using wolfssl with --with-ca-fallback
76+ ( if wolfsslSupport then "--without-ca-fallback" else "--with-ca-fallback")
7177 "--disable-manual"
7278 ( if sslSupport then "--with-ssl=${openssl.dev}" else "--without-ssl" )
7379 ( if gnutlsSupport then "--with-gnutls=${gnutls.dev}" else "--without-gnutls" )
@@ -77,6 +83,7 @@ stdenv.mkDerivation rec {
7783 ( if idnSupport then "--with-libidn=${libidn.dev}" else "--without-libidn" )
7884 ( if brotliSupport then "--with-brotli" else "--without-brotli" )
7985 ]
86+ ++ stdenv.lib.optional wolfsslSupport "--with-wolfssl=${wolfssl.dev}"
8087 ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
8188 ++ stdenv.lib.optional gssSupport "--with-gssapi=${libkrb5.dev}"
8289 # For the 'urandom', maybe it should be a cross-system option