2021-11-14 15:17:29 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2022-09-06 15:50:51 +00:00
|
|
|
, cmake
|
2022-05-19 19:41:24 +00:00
|
|
|
, cunit, ncurses
|
2023-03-25 11:30:15 +00:00
|
|
|
, libev, nghttp3, quictls
|
2022-02-03 18:12:40 +00:00
|
|
|
, withJemalloc ? false, jemalloc
|
2022-09-05 14:19:17 +00:00
|
|
|
, curlHTTP3
|
2021-11-14 15:17:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ngtcp2";
|
2023-03-31 12:41:49 +00:00
|
|
|
version = "0.14.1";
|
2021-11-14 15:17:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ngtcp2";
|
|
|
|
repo = pname;
|
2022-04-28 21:42:26 +00:00
|
|
|
rev = "v${version}";
|
2023-03-31 12:41:49 +00:00
|
|
|
hash = "sha256-VsacRYvjTWVx2ga952s1vs02GElXIW6umgcYr3UCcgE=";
|
2021-11-14 15:17:29 +00:00
|
|
|
};
|
|
|
|
|
2022-05-19 19:41:24 +00:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
2022-09-06 15:50:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ cunit ncurses ];
|
2023-03-25 11:30:15 +00:00
|
|
|
buildInputs = [ libev nghttp3 quictls ] ++ lib.optional withJemalloc jemalloc;
|
2021-11-14 15:17:29 +00:00
|
|
|
|
2022-09-06 15:50:51 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_STATIC_LIB=OFF"
|
|
|
|
];
|
2021-11-14 15:17:29 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
2022-02-03 16:34:47 +00:00
|
|
|
enableParallelBuilding = true;
|
2021-11-14 15:17:29 +00:00
|
|
|
|
2022-09-05 14:19:17 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit curlHTTP3;
|
|
|
|
};
|
|
|
|
|
2021-11-14 15:17:29 +00:00
|
|
|
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;
|
2022-02-03 16:34:47 +00:00
|
|
|
platforms = platforms.unix;
|
2021-11-14 15:17:29 +00:00
|
|
|
maintainers = with maintainers; [ izorkin ];
|
|
|
|
};
|
|
|
|
}
|