at 18.03-beta 46 lines 1.3 kB view raw
1{ stdenv, fetchurl, libxml2, pkgconfig 2, compressionSupport ? true, zlib ? null 3, sslSupport ? true, openssl ? null 4, static ? false 5, shared ? true 6}: 7 8assert compressionSupport -> zlib != null; 9assert sslSupport -> openssl != null; 10assert static || shared; 11 12let 13 inherit (stdenv.lib) optionals; 14in 15 16stdenv.mkDerivation rec { 17 version = "0.30.2"; 18 name = "neon-${version}"; 19 20 src = fetchurl { 21 url = "http://www.webdav.org/neon/${name}.tar.gz"; 22 sha256 = "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"; 23 }; 24 25 patches = optionals stdenv.isDarwin [ ./0.29.6-darwin-fix-configure.patch ]; 26 27 nativeBuildInputs = [ pkgconfig ]; 28 buildInputs = [libxml2 openssl] 29 ++ stdenv.lib.optional compressionSupport zlib; 30 31 configureFlags = '' 32 ${if shared then "--enable-shared" else "--disable-shared"} 33 ${if static then "--enable-static" else "--disable-static"} 34 ${if compressionSupport then "--with-zlib" else "--without-zlib"} 35 ${if sslSupport then "--with-ssl" else "--without-ssl"} 36 --enable-shared 37 ''; 38 39 passthru = {inherit compressionSupport sslSupport;}; 40 41 meta = { 42 description = "An HTTP and WebDAV client library"; 43 homepage = http://www.webdav.org/neon/; 44 platforms = stdenv.lib.platforms.unix; 45 }; 46}