ocamlPackages.cohttp-async: init at 2.5.1

This commit is contained in:
Aaron L. Zeng 2020-07-09 20:51:58 -04:00
parent 94790b2949
commit 48e06000c2
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{ stdenv, buildDunePackage, async, cohttp, conduit-async, uri, ppx_sexp_conv
, logs, magic-mime }:
if !stdenv.lib.versionAtLeast cohttp.version "0.99" then
cohttp
else if !stdenv.lib.versionAtLeast async.version "0.13" then
throw "cohttp-async needs async-0.13 (hence OCaml >= 4.08)"
else
buildDunePackage {
pname = "cohttp-async";
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";
};
}

View file

@ -137,6 +137,8 @@ let
cohttp = callPackage ../development/ocaml-modules/cohttp { };
cohttp-async = callPackage ../development/ocaml-modules/cohttp/async.nix { };
cohttp-lwt = callPackage ../development/ocaml-modules/cohttp/lwt.nix { };
cohttp-lwt-unix = callPackage ../development/ocaml-modules/cohttp/lwt-unix.nix { };