2024-05-13 21:24:10 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gnutls, cunit
|
|
|
|
, ncurses, knot-dns }:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ngtcp2";
|
|
|
|
version = "1.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ngtcp2";
|
|
|
|
repo = "ngtcp2";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-C1Rk0KzTvFpwCz8vXvhSqGjYmGyLZxmnzZhPLZiL97M=";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
|
|
|
buildInputs = [ gnutls ];
|
|
|
|
|
|
|
|
configureFlags = [ "--with-gnutls=yes" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
2024-05-13 21:24:10 +00:00
|
|
|
nativeCheckInputs = [ cunit ] ++ lib.optional stdenv.isDarwin ncurses;
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
passthru.tests = knot-dns.passthru.tests; # the only consumer so far
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/ngtcp2/ngtcp2";
|
|
|
|
description = "an effort to implement RFC9000 QUIC protocol.";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
2024-05-13 21:24:10 +00:00
|
|
|
maintainers = with maintainers;
|
|
|
|
[
|
|
|
|
vcunat # for knot-dns
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
/* Why split from ./default.nix?
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
ngtcp2 libs contain helpers to plug into various crypto libs (gnutls, patched openssl, ...).
|
|
|
|
Building multiple of them while keeping closures separable would be relatively complicated.
|
|
|
|
Separating the builds is easier for now; the missed opportunity to share the 0.3--0.4 MB
|
|
|
|
library isn't such a big deal.
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
Moreover upstream still commonly does incompatible changes, so agreeing
|
|
|
|
on a single version might be hard sometimes. That's why it seemed simpler
|
|
|
|
to completely separate the nix expressions, too.
|
2024-05-02 00:46:19 +00:00
|
|
|
*/
|
|
|
|
|