diff --git a/pkgs/tools/networking/curl/builder.sh b/pkgs/tools/networking/curl/builder.sh new file mode 100644 index 000000000000..dd693683cb0d --- /dev/null +++ b/pkgs/tools/networking/curl/builder.sh @@ -0,0 +1,9 @@ +source $stdenv/setup + +if test "$sslSupport"; then + configureFlags="--with-ssl=$openssl" +else + configureFlags="--without-ssl" +fi + +genericBuild diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index abce6fb3a37a..0d3f4a1eded3 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -4,11 +4,12 @@ assert sslSupport -> openssl != null; stdenv.mkDerivation { name = "curl-7.15.1"; + builder = ./builder.sh; src = fetchurl { url = http://nix.cs.uu.nl/dist/tarballs/curl-7.15.1.tar.bz2; md5 = "d330d48580bfade58c82d4f295f171f0"; }; buildInputs = [zlib (if sslSupport then openssl else null)]; patches = [./configure-cxxcpp.patch]; - configureFlags = (if sslSupport then "--with-ssl" else "--without-ssl"); + inherit sslSupport openssl; }