Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 nix-update-script, 7 testers, 8 python3, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "llhttp"; 13 version = "9.3.0"; 14 15 src = fetchFromGitHub { 16 owner = "nodejs"; 17 repo = "llhttp"; 18 tag = "release/v${finalAttrs.version}"; 19 hash = "sha256-VL58h8sdJIpzMiWNqTvfp8oITjb0b3X/F8ygaE9cH94="; 20 }; 21 22 outputs = [ 23 "out" 24 "dev" 25 ]; 26 27 nativeBuildInputs = [ 28 cmake 29 ]; 30 31 cmakeFlags = [ 32 (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) 33 (lib.cmakeBool "BUILD_STATIC_LIBS" stdenv.hostPlatform.isStatic) 34 ]; 35 36 passthru.updateScript = nix-update-script { 37 extraArgs = [ "--version-regex=release/v(.+)" ]; 38 }; 39 passthru.tests = { 40 inherit (python3.pkgs) aiohttp; 41 42 pkg-config = testers.hasPkgConfigModules { 43 package = finalAttrs.finalPackage; 44 moduleNames = [ "libllhttp" ]; 45 }; 46 }; 47 48 meta = { 49 description = "Port of http_parser to llparse"; 50 homepage = "https://llhttp.org/"; 51 changelog = "https://github.com/nodejs/llhttp/releases/tag/release/v${finalAttrs.version}"; 52 license = lib.licenses.mit; 53 maintainers = with lib.maintainers; [ aduh95 ]; 54 platforms = lib.platforms.all; 55 }; 56})