Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder
2, ppx_fields_conv, ppx_sexp_conv, ppx_deriving
3, base64, fieldslib, jsonm, logs, re, stringext, uri
4}:
5
6stdenv.mkDerivation rec {
7 version = "0.99.0";
8 name = "ocaml${ocaml.version}-cohttp-${version}";
9
10 src = fetchFromGitHub {
11 owner = "mirage";
12 repo = "ocaml-cohttp";
13 rev = "v${version}";
14 sha256 = "0y8qhzfwrc6486apmp2rsj822cnfhnz4w8rsb52w5wqmsgjxx1bj";
15 };
16
17 buildInputs = [ ocaml findlib jbuilder jsonm ppx_fields_conv ppx_sexp_conv ];
18
19 propagatedBuildInputs = [ ppx_deriving base64 fieldslib re stringext uri ];
20
21 buildPhase = "jbuilder build -p cohttp";
22
23 inherit (jbuilder) installPhase;
24
25 meta = {
26 description = "HTTP(S) library for Lwt, Async and Mirage";
27 license = stdenv.lib.licenses.isc;
28 maintainers = [ stdenv.lib.maintainers.vbgl ];
29 inherit (src.meta) homepage;
30 inherit (ocaml.meta) platforms;
31 };
32}