From 678e9ccc1ef18adb670fe8d2d28b2dde25dbfacd Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 26 Jul 2014 23:20:34 +0200 Subject: [PATCH] curl: Set cabundle in configure. Closes #3382 --- pkgs/tools/networking/curl/default.nix | 3 +++ pkgs/top-level/all-packages.nix | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 3d23d7950fbe0..f06cedf42f262 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl , zlibSupport ? false, zlib ? null , sslSupport ? false, openssl ? null +, withCacert ? false, cacert ? null , scpSupport ? false, libssh2 ? null , gssSupport ? false, gss ? null , c-aresSupport ? false, c-ares ? null @@ -9,6 +10,7 @@ assert zlibSupport -> zlib != null; assert sslSupport -> openssl != null; +assert withCacert -> cacert != null; assert scpSupport -> libssh2 != null; assert c-aresSupport -> c-ares != null; @@ -41,6 +43,7 @@ stdenv.mkDerivation rec { ( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" ) ] ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}" + ++ stdenv.lib.optional withCacert "--with-ca-bundle=${cacert}/etc/ca-bundle.crt" ++ stdenv.lib.optional gssSupport "--with-gssapi=${gss}" ++ stdenv.lib.optionals linkStatic [ "--enable-static" "--disable-shared" ] ; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a0dcdfba01f96..97b8cd8b39789 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -827,6 +827,7 @@ let curl = callPackage ../tools/networking/curl rec { fetchurl = fetchurlBoot; zlibSupport = true; + withCacert = true; sslSupport = zlibSupport; scpSupport = zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin; }; @@ -7887,7 +7888,13 @@ let bakoma_ttf = callPackage ../data/fonts/bakoma-ttf { }; - cacert = callPackage ../data/misc/cacert { }; + cacert = + let + fetchurl = import ../build-support/fetchurl { + inherit stdenv; + curl = curl.override { withCacert = false; }; + }; + in callPackage ../data/misc/cacert { inherit fetchurl; }; cantarell_fonts = callPackage ../data/fonts/cantarell-fonts { };