2021-01-11 12:49:15 +00:00
|
|
|
{ lib, buildDunePackage, async, cohttp, conduit-async, uri, ppx_sexp_conv
|
2020-07-10 01:51:58 +01:00
|
|
|
, logs, magic-mime }:
|
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if !lib.versionAtLeast cohttp.version "0.99" then
|
2020-07-10 01:51:58 +01:00
|
|
|
cohttp
|
2021-01-11 12:49:15 +00:00
|
|
|
else if !lib.versionAtLeast async.version "0.13" then
|
2020-07-10 01:51:58 +01:00
|
|
|
throw "cohttp-async needs async-0.13 (hence OCaml >= 4.08)"
|
|
|
|
else
|
|
|
|
|
|
|
|
buildDunePackage {
|
|
|
|
pname = "cohttp-async";
|
2020-05-26 00:23:05 +01:00
|
|
|
useDune2 = true;
|
2020-07-10 01:51:58 +01:00
|
|
|
inherit (cohttp) version src;
|
|
|
|
|
|
|
|
buildInputs = [ ppx_sexp_conv ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ async cohttp conduit-async logs magic-mime uri ];
|
|
|
|
|
|
|
|
meta = cohttp.meta // {
|
|
|
|
description = "CoHTTP implementation for the Async concurrency library";
|
|
|
|
};
|
|
|
|
}
|