@@ -1,79 +0,0 @@
1−{ stdenv, fetchurl
2−, zlibSupport ? false, zlib ? null
3−, sslSupport ? false, openssl ? null
4−, scpSupport ? false, libssh2 ? null
5−, gssSupport ? false, gss ? null
6−, c-aresSupport ? false, c-ares ? null
7−, linkStatic ? false
8−}:
9−
10−assert zlibSupport -> zlib != null;
11−assert sslSupport -> openssl != null;
12−assert scpSupport -> libssh2 != null;
13−assert c-aresSupport -> c-ares != null;
14−
15−stdenv.mkDerivation rec {
16− name = "curl-7.15.0";
17−
18− src = fetchurl {
19− url = "http://curl.haxx.se/download/archeology/${name}.tar.gz";
20− sha256 = "061bgjm6rv0l9804vmm4jvr023l52qvmy9qq4zjv4lgqhlljvhz3";
21− };
22−
23− patches = [ ./disable-ca-install.patch ];
24−
25− # Zlib and OpenSSL must be propagated because `libcurl.la' contains
26− # "-lz -lssl", which aren't necessary direct build inputs of
27− # applications that use Curl.
28− propagatedBuildInputs = with stdenv.lib;
29− optional zlibSupport zlib ++
30− optional gssSupport gss ++
31− optional c-aresSupport c-ares ++
32− optional sslSupport openssl;
33−
34− preConfigure = ''
35− sed -e 's|/usr/bin|/no-such-path|g' -i.bak configure
36− '';
37−
38− configureFlags = [
39− "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt"
40− ( if sslSupport then "--with-ssl=${openssl.dev}" else "--without-ssl" )
41− ( if scpSupport then "--with-libssh2=${libssh2.dev}" else "--without-libssh2" )
42− ]
43− ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
44− ++ stdenv.lib.optional gssSupport "--with-gssapi=${gss}"
45− ++ stdenv.lib.optionals linkStatic [ "--enable-static" "--disable-shared" ]
46− ;
47−
48− dontDisableStatic = linkStatic;
49−
50− LDFLAGS = if linkStatic then "-static" else "";
51− CXX = "g++";
52− CXXCPP = "g++ -E";
53−
54− # libtool hack to get a static binary. Notice that to 'configure' I passed
55− # other LDFLAGS, because it doesn't use libtool for linking in the tests.
56− makeFlags = if linkStatic then "LDFLAGS=-all-static" else "";
57−
58− crossAttrs = {
59− # We should refer to the cross built openssl
60− # For the 'urandom', maybe it should be a cross-system option
61− configureFlags = [
62− ( if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl" )
63− "--with-random /dev/urandom"
64− ]
65− ++ stdenv.lib.optionals linkStatic [ "--enable-static" "--disable-shared" ]
66− ;
67− };
68−
69− passthru = {
70− inherit sslSupport openssl;
71− };
72−
73− meta = {
74− homepage = "http://curl.haxx.se/";
75− description = "A command line tool for transferring files with URL syntax";
76− platforms = with stdenv.lib.platforms; allBut darwin;
77− broken = true;
78− };
79−}