From f4ab3dc223ede44cb9d20ed0638d7528219b04fa Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Wed, 19 Nov 2014 14:45:02 +0100 Subject: [PATCH] libcurl: Honor $SSL_CERT_FILE --- pkgs/tools/networking/curl/7.15.nix | 6 ++++++ pkgs/tools/networking/curl/default.nix | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/pkgs/tools/networking/curl/7.15.nix b/pkgs/tools/networking/curl/7.15.nix index 0a87eaa944c..df42b7d290e 100644 --- a/pkgs/tools/networking/curl/7.15.nix +++ b/pkgs/tools/networking/curl/7.15.nix @@ -32,6 +32,12 @@ stdenv.mkDerivation rec { preConfigure = '' sed -e 's|/usr/bin|/no-such-path|g' -i.bak configure ''; + + # make curl honor CURL_CA_BUNDLE & SSL_CERT_FILE + postConfigure = '' + echo '#define CURL_CA_BUNDLE (getenv("CURL_CA_BUNDLE") || getenv("SSL_CERT_FILE"))' >> lib/curl_config.h + ''; + configureFlags = [ ( if sslSupport then "--with-ssl=${openssl}" else "--without-ssl" ) ( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" ) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 85b935ebd76..f055680a2f0 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -36,6 +36,11 @@ stdenv.mkDerivation rec { rm src/tool_hugehelp.c ''; + # make curl honor CURL_CA_BUNDLE & SSL_CERT_FILE + postConfigure = '' + echo '#define CURL_CA_BUNDLE (getenv("CURL_CA_BUNDLE") || getenv("SSL_CERT_FILE"))' >> lib/curl_config.h + ''; + configureFlags = [ ( if sslSupport then "--with-ssl=${openssl}" else "--without-ssl" ) ( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" )