2024-06-30 08:16:52 +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;
|
|
|
|
};
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
"doc"
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [
|
|
|
|
brotli
|
|
|
|
libev
|
|
|
|
nghttp3
|
|
|
|
quictls
|
2024-06-30 08:16:52 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ CoreServices ] ++ lib.optional withJemalloc jemalloc;
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
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";
|
|
|
|
description = "ngtcp2 project is an effort to implement QUIC protocol which is now being discussed in IETF QUICWG for its standardization.";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ izorkin ];
|
|
|
|
};
|
|
|
|
}
|