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