Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4 pname = "http-parser";
5 version = "2.9.4";
6
7 src = fetchFromGitHub {
8 owner = "nodejs";
9 repo = "http-parser";
10 rev = "v${version}";
11 sha256 = "1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c";
12 };
13
14 NIX_CFLAGS_COMPILE = "-Wno-error";
15 patches = [ ./build-shared.patch ];
16 makeFlags = [ "DESTDIR=" "PREFIX=$(out)" ];
17 buildFlags = [ "library" ];
18 doCheck = true;
19 checkTarget = "test";
20
21 meta = with lib; {
22 description = "An HTTP message parser written in C";
23 homepage = "https://github.com/nodejs/http-parser";
24 maintainers = with maintainers; [ matthewbauer ];
25 license = licenses.mit;
26 platforms = platforms.unix;
27 };
28}