2024-05-13 21:24:10 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, brotli, libev, nghttp3, quictls
|
|
|
|
, CoreServices, withJemalloc ? false, jemalloc
|
2024-05-02 00:46:19 +00:00
|
|
|
# for passthru.tests
|
|
|
|
# , curlHTTP3
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ngtcp2";
|
|
|
|
version = "1.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ngtcp2";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-te/kFt7/09QpmkHZ7dJxyKvvxP+mHtIQIgESkJATR38=";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2024-05-13 21:24:10 +00:00
|
|
|
buildInputs = [ brotli libev nghttp3 quictls ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ CoreServices ]
|
|
|
|
++ lib.optional withJemalloc jemalloc;
|
|
|
|
|
|
|
|
cmakeFlags = [ (lib.cmakeBool "ENABLE_STATIC_LIB" false) ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
# passthru.tests = {
|
|
|
|
# inherit curlHTTP3;
|
|
|
|
# };
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/ngtcp2/ngtcp2";
|
2024-05-13 21:24:10 +00:00
|
|
|
description =
|
|
|
|
"ngtcp2 project is an effort to implement QUIC protocol which is now being discussed in IETF QUICWG for its standardization.";
|
2024-05-02 00:46:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ izorkin ];
|
|
|
|
};
|
|
|
|
}
|