From b2b2330c355945755b0288ce9b788035ed9bf2eb Mon Sep 17 00:00:00 2001 From: Marco A L Barbosa Date: Thu, 28 Nov 2019 09:26:42 -0300 Subject: curl: add option to use wolfssl backend --- pkgs/tools/networking/curl/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pkgs') diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 24c3145c7db..051271e9788 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -5,6 +5,7 @@ , zlibSupport ? true, zlib ? null , sslSupport ? zlibSupport, openssl ? null , gnutlsSupport ? false, gnutls ? null +, wolfsslSupport ? false, wolfssl ? null , scpSupport ? zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin, libssh2 ? null , gssSupport ? !stdenv.hostPlatform.isWindows, libkrb5 ? null , c-aresSupport ? false, c-ares ? null @@ -17,7 +18,10 @@ assert ldapSupport -> openldap != null; assert zlibSupport -> zlib != null; assert sslSupport -> openssl != null; assert !(gnutlsSupport && sslSupport); +assert !(gnutlsSupport && wolfsslSupport); +assert !(sslSupport && wolfsslSupport); assert gnutlsSupport -> gnutls != null; +assert wolfsslSupport -> wolfssl != null; assert scpSupport -> libssh2 != null; assert c-aresSupport -> c-ares != null; assert brotliSupport -> brotli != null; @@ -53,6 +57,7 @@ stdenv.mkDerivation rec { optional c-aresSupport c-ares ++ optional sslSupport openssl ++ optional gnutlsSupport gnutls ++ + optional wolfsslSupport wolfssl ++ optional scpSupport libssh2 ++ optional brotliSupport brotli; @@ -67,7 +72,8 @@ stdenv.mkDerivation rec { # to nss-cacert from the default profile. "--without-ca-bundle" "--without-ca-path" - "--with-ca-fallback" + # The build fails when using wolfssl with --with-ca-fallback + ( if wolfsslSupport then "--without-ca-fallback" else "--with-ca-fallback") "--disable-manual" ( if sslSupport then "--with-ssl=${openssl.dev}" else "--without-ssl" ) ( if gnutlsSupport then "--with-gnutls=${gnutls.dev}" else "--without-gnutls" ) @@ -77,6 +83,7 @@ stdenv.mkDerivation rec { ( if idnSupport then "--with-libidn=${libidn.dev}" else "--without-libidn" ) ( if brotliSupport then "--with-brotli" else "--without-brotli" ) ] + ++ stdenv.lib.optional wolfsslSupport "--with-wolfssl=${wolfssl.dev}" ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}" ++ stdenv.lib.optional gssSupport "--with-gssapi=${libkrb5.dev}" # For the 'urandom', maybe it should be a cross-system option -- cgit 1.4.1