2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, autoreconfHook, pkg-config
|
2022-02-10 20:34:41 +00:00
|
|
|
, cunit, file, ncurses
|
|
|
|
, libev, nghttp3, quictls
|
|
|
|
, withJemalloc ? false, jemalloc
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ngtcp2";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.4.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ngtcp2";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-nmVVK2lpz01hgSxPAMmBfF+nNVZu9PWRGzCWh/5yhj8=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config file ];
|
|
|
|
buildInputs = [ libev nghttp3 quictls ] ++ lib.optional withJemalloc jemalloc;
|
|
|
|
checkInputs = [ cunit ncurses ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
doCheck = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
enableParallelBuilding = true;
|
2021-12-06 16:07:01 +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-10 20:34:41 +00:00
|
|
|
platforms = platforms.unix;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ izorkin ];
|
|
|
|
};
|
|
|
|
}
|