1{ lib, fetchurl, buildDunePackage
2, ppx_sexp_conv, base64, jsonm, re, stringext, uri-sexp
3, ocaml, fmt, alcotest
4}:
5
6buildDunePackage rec {
7 pname = "cohttp";
8 version = "4.0.0";
9
10 useDune2 = true;
11
12 minimumOCamlVersion = "4.08";
13
14 src = fetchurl {
15 url = "https://github.com/mirage/ocaml-cohttp/releases/download/v${version}/cohttp-v${version}.tbz";
16 sha256 = "bd7aa4cd2c82744990ed7c49e3ee7a40324c64cb3d8509804809155e2bacd1d2";
17 };
18
19 buildInputs = [ jsonm ppx_sexp_conv ];
20
21 propagatedBuildInputs = [ base64 re stringext uri-sexp ];
22
23 doCheck = lib.versionAtLeast ocaml.version "4.05";
24 checkInputs = [ fmt alcotest ];
25
26 meta = {
27 description = "HTTP(S) library for Lwt, Async and Mirage";
28 license = lib.licenses.isc;
29 maintainers = [ lib.maintainers.vbgl ];
30 homepage = "https://github.com/mirage/ocaml-cohttp";
31 };
32}