at master 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 brotli, 7 libev, 8 nghttp3, 9 quictls, 10 withJemalloc ? false, 11 jemalloc, 12 curlHTTP3, 13}: 14 15stdenv.mkDerivation (finalAttrs: { 16 pname = "ngtcp2"; 17 version = "1.14.0"; 18 19 src = fetchFromGitHub { 20 owner = "ngtcp2"; 21 repo = "ngtcp2"; 22 # must match version usage in meta.changelog 23 tag = "v${finalAttrs.version}"; 24 hash = "sha256-5Pmk752i/lgO/os2SegevGN+MKaVuQii2HrVWaR15Gg="; 25 fetchSubmodules = true; 26 }; 27 28 outputs = [ 29 "out" 30 "dev" 31 "doc" 32 ]; 33 34 nativeBuildInputs = [ cmake ]; 35 buildInputs = [ 36 brotli 37 libev 38 nghttp3 39 quictls 40 ] 41 ++ lib.optional withJemalloc jemalloc; 42 43 cmakeFlags = [ 44 (lib.cmakeBool "ENABLE_STATIC_LIB" false) 45 ]; 46 47 doCheck = true; 48 49 passthru.tests = { 50 inherit curlHTTP3; 51 }; 52 53 meta = { 54 homepage = "https://github.com/ngtcp2/ngtcp2"; 55 changelog = "https://github.com/ngtcp2/ngtcp2/releases/tag/v${finalAttrs.version}"; 56 description = "Implementation of the QUIC protocol (RFC9000)"; 57 license = lib.licenses.mit; 58 platforms = lib.platforms.unix; 59 maintainers = with lib.maintainers; [ izorkin ]; 60 }; 61})