diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix index f7a026c52d46..0697b05c0a5d 100644 --- a/pkgs/development/libraries/nghttp2/default.nix +++ b/pkgs/development/libraries/nghttp2/default.nix @@ -2,9 +2,19 @@ # Optional Dependencies , openssl ? null, libev ? null, zlib ? null -#, jansson ? null, boost ? null, libxml2 ? null, jemalloc ? null +, enableHpack ? false, jansson ? null +, enableAsioLib ? false, boost ? null +, enableGetAssets ? false, libxml2 ? null +, enableJemalloc ? false, jemalloc ? null }: +assert enableHpack -> jansson != null; +assert enableAsioLib -> boost != null; +assert enableGetAssets -> libxml2 != null; +assert enableJemalloc -> jemalloc != null; + +with { inherit (stdenv.lib) optional; }; + stdenv.mkDerivation rec { name = "nghttp2-${version}"; version = "1.17.0"; @@ -18,7 +28,11 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "lib" ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ openssl libev zlib ]; + buildInputs = [ openssl libev zlib ] + ++ optional enableHpack jansson + ++ optional enableAsioLib boost + ++ optional enableGetAssets libxml2 + ++ optional enableJemalloc jemalloc; enableParallelBuilding = true;