From 5717d5e09e2517f99c737d2e3af7257f082e1b91 Mon Sep 17 00:00:00 2001 From: John Chee Date: Sat, 25 Apr 2015 14:01:36 -0700 Subject: [PATCH] curl: ldap and libidn support as `curlFull` --- pkgs/tools/networking/curl/default.nix | 9 +++++++++ pkgs/top-level/all-packages.nix | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 08c00fc4b342..4fd30cc1fa1e 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -1,4 +1,6 @@ { stdenv, fetchurl +, idnSupport ? false, libidn ? null +, ldapSupport ? false, openldap ? null , zlibSupport ? false, zlib ? null , sslSupport ? false, openssl ? null , scpSupport ? false, libssh2 ? null @@ -6,6 +8,8 @@ , c-aresSupport ? false, c-ares ? null }: +assert idnSupport -> libidn != null; +assert ldapSupport -> openldap != null; assert zlibSupport -> zlib != null; assert sslSupport -> openssl != null; assert scpSupport -> libssh2 != null; @@ -23,6 +27,8 @@ stdenv.mkDerivation rec { # "-lz -lssl", which aren't necessary direct build inputs of # applications that use Curl. propagatedBuildInputs = with stdenv.lib; + optional idnSupport libidn ++ + optional ldapSupport openldap ++ optional zlibSupport zlib ++ optional gssSupport gss ++ optional c-aresSupport c-ares ++ @@ -43,6 +49,9 @@ stdenv.mkDerivation rec { configureFlags = [ ( if sslSupport then "--with-ssl=${openssl}" else "--without-ssl" ) ( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" ) + ( if ldapSupport then "--enable-ldap" else "--disable-ldap" ) + ( if ldapSupport then "--enable-ldaps" else "--disable-ldaps" ) + ( if idnSupport then "--with-libidn=${libidn}" else "--without-libidn" ) ] ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}" ++ stdenv.lib.optional gssSupport "--with-gssapi=${gss}"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c0bc08be131..7cf271ca16a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1050,6 +1050,12 @@ let cudatoolkit = cudatoolkit5; + curlFull = curl.override { + idnSupport = true; + ldapSupport = true; + gssSupport = true; + }; + curl = callPackage ../tools/networking/curl rec { fetchurl = fetchurlBoot; zlibSupport = true;