Merge pull request #88886 from bcc32/cohttp-async

ocamlPackages.cohttp-async: init at 2.5.1
This commit is contained in:
Vincent Laporte 2020-08-29 06:33:57 +02:00 committed by GitHub
commit 5cf4bb811f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 2 deletions

View File

@ -0,0 +1,22 @@
{ 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";
useDune2 = true;
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

@ -0,0 +1,19 @@
{ stdenv, buildDunePackage, async, async_ssl, ppx_sexp_conv, conduit }:
if !stdenv.lib.versionAtLeast conduit.version "1.0"
then conduit
else
buildDunePackage {
pname = "conduit-async";
useDune2 = true;
inherit (conduit) version src;
buildInputs = [ ppx_sexp_conv ];
propagatedBuildInputs = [ async async_ssl conduit ];
meta = conduit.meta // {
description = "A network connection establishment library for Async";
};
}

View File

@ -18,7 +18,7 @@ buildDunePackage rec {
propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri ];
meta = {
description = "Network connection library for TCP and SSL";
description = "A network connection establishment library";
license = stdenv.lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ alexfmpe vbgl ];
homepage = "https://github.com/mirage/ocaml-conduit";

View File

@ -1,5 +1,6 @@
{ janePackage
, ctypes
, dune-configurator
, num
, octavius
, ppxlib
@ -417,6 +418,15 @@ rec {
propagatedBuildInputs = [ async shell ];
};
async_ssl = janePackage {
pname = "async_ssl";
useDune2 = true;
hash = "0z5dbiam5k7ipx9ph4r8nqv0a1ldx1ymxw3xjxgrdjda90lmwf2k";
meta.description = "Async wrappers for SSL";
buildInputs = [ dune-configurator ];
propagatedBuildInputs = [ async ctypes openssl ];
};
core_bench = janePackage {
pname = "core_bench";
hash = "1nk0i3z8rqrljbf4bc7ljp71g0a4361nh85s2ang0lgxri74zacm";

View File

@ -137,12 +137,16 @@ 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 { };
conduit = callPackage ../development/ocaml-modules/conduit { };
conduit-async = callPackage ../development/ocaml-modules/conduit/async.nix { };
conduit-lwt = callPackage ../development/ocaml-modules/conduit/lwt.nix { };
conduit-lwt-unix = callPackage ../development/ocaml-modules/conduit/lwt-unix.nix { };
@ -991,7 +995,7 @@ let
janeStreet =
if lib.versionOlder "4.08" ocaml.version
then import ../development/ocaml-modules/janestreet/0.13.nix {
inherit ctypes janePackage num octavius ppxlib re;
inherit ctypes dune-configurator janePackage num octavius ppxlib re;
inherit (pkgs) openssl;
}
else if lib.versionOlder "4.07" ocaml.version