btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / ll / llhttp / package.nix
blobdfdd8200b5565c2fe0806f0beba7ab98fbac8c17
1 { lib, stdenv, fetchFromGitHub, cmake, testers, python3 }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "llhttp";
5   version = "9.2.1";
7   src = fetchFromGitHub {
8     owner = "nodejs";
9     repo = "llhttp";
10     rev = "release/v${finalAttrs.version}";
11     hash = "sha256-cnEp7Ds32bqu3jeUU/rqJOr/VW3KNmJU4pmNNaTpXRs=";
12   };
14   outputs = [ "out" "dev" ];
16   nativeBuildInputs = [
17     cmake
18   ];
20   cmakeFlags = [
21     "-DBUILD_STATIC_LIBS=ON"
22   ];
24   passthru.tests = {
25     inherit (python3.pkgs) aiohttp;
27     pkg-config = testers.hasPkgConfigModules {
28       package = finalAttrs.finalPackage;
29       moduleNames = [ "libllhttp" ];
30     };
31   };
33   meta = with lib; {
34     description = "Port of http_parser to llparse";
35     homepage = "https://llhttp.org/";
36     changelog = "https://github.com/nodejs/llhttp/releases/tag/release/v${finalAttrs.version}";
37     license = licenses.mit;
38     maintainers = [ ];
39     platforms = platforms.all;
40   };