From 8d479c039752af95dccb1afb126aedafdc44502e Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 29 Nov 2017 18:55:11 +0800 Subject: [PATCH] curl: Add brotli support --- pkgs/tools/networking/curl/default.nix | 6 +++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 7f8d50b6d89c..c356a307e3e3 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -8,6 +8,7 @@ , scpSupport ? false, libssh2 ? null , gssSupport ? false, gss ? null , c-aresSupport ? false, c-ares ? null +, brotliSupport ? false, brotli ? null }: assert http2Support -> nghttp2 != null; @@ -19,6 +20,7 @@ assert !(gnutlsSupport && sslSupport); assert gnutlsSupport -> gnutls != null; assert scpSupport -> libssh2 != null; assert c-aresSupport -> c-ares != null; +assert brotliSupport -> brotli != null; stdenv.mkDerivation rec { name = "curl-7.57.0"; @@ -47,7 +49,8 @@ stdenv.mkDerivation rec { optional c-aresSupport c-ares ++ optional sslSupport openssl ++ optional gnutlsSupport gnutls ++ - optional scpSupport libssh2; + optional scpSupport libssh2 ++ + optional brotliSupport brotli; # for the second line see https://curl.haxx.se/mail/tracker-2014-03/0087.html preConfigure = '' @@ -64,6 +67,7 @@ stdenv.mkDerivation rec { ( 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" ) + ( if brotliSupport then "--with-brotli" else "--without-brotli" ) ] ++ 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 d78fb7f240d1..94bf2fbe491c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1639,6 +1639,7 @@ with pkgs; idnSupport = true; ldapSupport = true; gssSupport = true; + brotliSupport = true; }; curl = callPackage ../tools/networking/curl rec {