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