summary refs log tree commit diff
path: root/pkgs/tools/networking/curl
diff options
context:
space:
mode:
authoradisbladis <adis@blad.is>2017-11-29 18:55:11 +0800
committeradisbladis <adis@blad.is>2017-11-29 19:47:41 +0800
commit8d479c039752af95dccb1afb126aedafdc44502e (patch)
tree786dd67c7635d0097fc6a3684d8e21df7a417ae7 /pkgs/tools/networking/curl
parent0e4edca60331e7ccea4ef27da4b25e85470ec8cc (diff)
downloadnixlib-8d479c039752af95dccb1afb126aedafdc44502e.tar
nixlib-8d479c039752af95dccb1afb126aedafdc44502e.tar.gz
nixlib-8d479c039752af95dccb1afb126aedafdc44502e.tar.bz2
nixlib-8d479c039752af95dccb1afb126aedafdc44502e.tar.lz
nixlib-8d479c039752af95dccb1afb126aedafdc44502e.tar.xz
nixlib-8d479c039752af95dccb1afb126aedafdc44502e.tar.zst
nixlib-8d479c039752af95dccb1afb126aedafdc44502e.zip
curl: Add brotli support
Diffstat (limited to 'pkgs/tools/networking/curl')
-rw-r--r--pkgs/tools/networking/curl/default.nix6
1 files changed, 5 insertions, 1 deletions
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}";