diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2016-08-01 17:22:28 +0200 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2016-08-01 17:22:41 +0200 |
commit | 8fd84fcb870b3d55f6760ede5bb46aa57bbec64e (patch) | |
tree | 5ebe0d3ef83a2a501f14e86afd9255b131546edd /pkgs/tools | |
parent | 909249dbe233522e6a2e6f3c056a49f8efb7ad46 (diff) | |
download | nixlib-8fd84fcb870b3d55f6760ede5bb46aa57bbec64e.tar nixlib-8fd84fcb870b3d55f6760ede5bb46aa57bbec64e.tar.gz nixlib-8fd84fcb870b3d55f6760ede5bb46aa57bbec64e.tar.bz2 nixlib-8fd84fcb870b3d55f6760ede5bb46aa57bbec64e.tar.lz nixlib-8fd84fcb870b3d55f6760ede5bb46aa57bbec64e.tar.xz nixlib-8fd84fcb870b3d55f6760ede5bb46aa57bbec64e.tar.zst nixlib-8fd84fcb870b3d55f6760ede5bb46aa57bbec64e.zip |
libreoffice: reinstante and use curl 7.48 before the removal of a required feature. CVE's not fixed because of that decision: a Windows-specific DLL substitution and a mbedSSL/PolarSSL specific insufficient certificate validation
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/curl/7.48.nix | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/pkgs/tools/networking/curl/7.48.nix b/pkgs/tools/networking/curl/7.48.nix new file mode 100644 index 000000000000..d156423a5478 --- /dev/null +++ b/pkgs/tools/networking/curl/7.48.nix @@ -0,0 +1,90 @@ +{ stdenv, fetchurl, pkgconfig, perl +, http2Support ? true, nghttp2 +, idnSupport ? false, libidn ? null +, ldapSupport ? false, openldap ? null +, zlibSupport ? false, zlib ? null +, sslSupport ? false, openssl ? null +, scpSupport ? false, libssh2 ? null +, gssSupport ? false, gss ? null +, c-aresSupport ? false, c-ares ? null +}: + +assert http2Support -> nghttp2 != null; +assert idnSupport -> libidn != null; +assert ldapSupport -> openldap != null; +assert zlibSupport -> zlib != null; +assert sslSupport -> openssl != null; +assert scpSupport -> libssh2 != null; +assert c-aresSupport -> c-ares != null; + +stdenv.mkDerivation rec { + name = "curl-7.48.0"; + + src = fetchurl { + url = "http://curl.haxx.se/download/${name}.tar.bz2"; + sha256 = "0ly7fbysxrdbclswcr6s7n5sfxfffzazv8blqr16sn0b44cphkl6"; + }; + + outputs = [ "dev" "out" "bin" "man" "docdev" ]; + + nativeBuildInputs = [ pkgconfig perl ]; + + # Zlib and OpenSSL must be propagated because `libcurl.la' contains + # "-lz -lssl", which aren't necessary direct build inputs of + # applications that use Curl. + propagatedBuildInputs = with stdenv.lib; + optional http2Support nghttp2 ++ + optional idnSupport libidn ++ + optional ldapSupport openldap ++ + optional zlibSupport zlib ++ + optional gssSupport gss ++ + optional c-aresSupport c-ares ++ + optional sslSupport openssl ++ + optional scpSupport libssh2; + + # for the second line see http://curl.haxx.se/mail/tracker-2014-03/0087.html + preConfigure = '' + sed -e 's|/usr/bin|/no-such-path|g' -i.bak configure + rm src/tool_hugehelp.c + ''; + + configureFlags = [ + "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt" + "--disable-manual" + ( if sslSupport then "--with-ssl=${openssl.dev}" else "--without-ssl" ) + ( if scpSupport then "--with-libssh2=${libssh2.dev}" 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.dev}" else "--without-libidn" ) + ] + ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}" + ++ stdenv.lib.optional gssSupport "--with-gssapi=${gss}"; + + CXX = "g++"; + CXXCPP = "g++ -E"; + + postInstall = '' + moveToOutput bin/curl-config "$dev" + sed '/^dependency_libs/s|${libssh2.dev}|${libssh2.out}|' -i "$out"/lib/*.la + ''; + + crossAttrs = { + # We should refer to the cross built openssl + # For the 'urandom', maybe it should be a cross-system option + configureFlags = [ + ( if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl" ) + "--with-random /dev/urandom" + ]; + }; + + passthru = { + inherit sslSupport openssl; + }; + + meta = with stdenv.lib; { + description = "A command line tool for transferring files with URL syntax"; + homepage = http://curl.haxx.se/; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.all; + }; +} |