Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
gnutls,
cunit,
ncurses,
knot-dns,
}:
stdenv.mkDerivation rec {
pname = "ngtcp2";
version = "1.15.1";
src = fetchFromGitHub {
owner = "ngtcp2";
repo = "ngtcp2";
rev = "v${version}";
hash = "sha256-cXYmnE7WqZulGrLQvjFyHVhCGfxB3nafWKeNugu+zL8=";
};
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [ gnutls ];
configureFlags = [ "--with-gnutls=yes" ];
enableParallelBuilding = true;
doCheck = true;
nativeCheckInputs = [ cunit ] ++ lib.optional stdenv.hostPlatform.isDarwin ncurses;
passthru.tests = knot-dns.passthru.tests; # the only consumer so far
meta = with lib; {
homepage = "https://github.com/ngtcp2/ngtcp2";
description = "Effort to implement RFC9000 QUIC protocol";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [
vcunat # for knot-dns
];
};
}
/*
Why split from ./default.nix?
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.
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.
*/