2021-01-15 22:18:51 +00:00
|
|
|
{ lib, buildDunePackage, cohttp, ocaml_lwt, uri, ppx_sexp_conv, logs }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
if !lib.versionAtLeast cohttp.version "0.99"
|
2020-04-24 23:36:52 +00:00
|
|
|
then cohttp
|
2021-01-15 22:18:51 +00:00
|
|
|
else if !lib.versionAtLeast ppx_sexp_conv.version "0.13"
|
2020-07-18 16:06:22 +00:00
|
|
|
then throw "cohttp-lwt is not available for ppx_sexp_conv version ${ppx_sexp_conv.version}"
|
2020-04-24 23:36:52 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
buildDunePackage {
|
2021-02-05 17:12:51 +00:00
|
|
|
pname = "cohttp-lwt";
|
|
|
|
inherit (cohttp) version src useDune2 meta;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = [ uri ppx_sexp_conv ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
propagatedBuildInputs = [ cohttp ocaml_lwt logs ];
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|