2021-11-14 16:17:29 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2022-05-19 21:41:24 +02:00
|
|
|
, autoreconfHook, pkg-config, file
|
2022-02-03 19:12:40 +01:00
|
|
|
, libev, nghttp3, quictls
|
2022-05-19 21:41:24 +02:00
|
|
|
, cunit, ncurses
|
2022-02-03 19:12:40 +01:00
|
|
|
, withJemalloc ? false, jemalloc
|
2021-11-14 16:17:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ngtcp2";
|
2022-09-04 20:25:09 +02:00
|
|
|
version = "0.8.1";
|
2021-11-14 16:17:29 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ngtcp2";
|
|
|
|
repo = pname;
|
2022-04-28 23:42:26 +02:00
|
|
|
rev = "v${version}";
|
2022-09-04 20:25:09 +02:00
|
|
|
sha256 = "sha256-Sn03nY80UmL5oeoK6ScPye1oSUmEKxgoz2VLHcvor3U=";
|
2021-11-14 16:17:29 +01:00
|
|
|
};
|
|
|
|
|
2022-05-19 21:41:24 +02:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
2022-02-03 17:34:47 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config file ];
|
2022-02-03 19:12:40 +01:00
|
|
|
buildInputs = [ libev nghttp3 quictls ] ++ lib.optional withJemalloc jemalloc;
|
2022-02-03 17:34:47 +01:00
|
|
|
checkInputs = [ cunit ncurses ];
|
2021-11-14 16:17:29 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
2022-02-03 17:34:47 +01:00
|
|
|
enableParallelBuilding = true;
|
2021-11-14 16:17:29 +01: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 17:34:47 +01:00
|
|
|
platforms = platforms.unix;
|
2021-11-14 16:17:29 +01:00
|
|
|
maintainers = with maintainers; [ izorkin ];
|
|
|
|
};
|
|
|
|
}
|