Merge pull request #88886 from bcc32/cohttp-async
ocamlPackages.cohttp-async: init at 2.5.1
This commit is contained in:
commit
5cf4bb811f
22
pkgs/development/ocaml-modules/cohttp/async.nix
Normal file
22
pkgs/development/ocaml-modules/cohttp/async.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
19
pkgs/development/ocaml-modules/conduit/async.nix
Normal file
19
pkgs/development/ocaml-modules/conduit/async.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
@ -18,7 +18,7 @@ buildDunePackage rec {
|
|||||||
propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri ];
|
propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Network connection library for TCP and SSL";
|
description = "A network connection establishment library";
|
||||||
license = stdenv.lib.licenses.isc;
|
license = stdenv.lib.licenses.isc;
|
||||||
maintainers = with stdenv.lib.maintainers; [ alexfmpe vbgl ];
|
maintainers = with stdenv.lib.maintainers; [ alexfmpe vbgl ];
|
||||||
homepage = "https://github.com/mirage/ocaml-conduit";
|
homepage = "https://github.com/mirage/ocaml-conduit";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ janePackage
|
{ janePackage
|
||||||
, ctypes
|
, ctypes
|
||||||
|
, dune-configurator
|
||||||
, num
|
, num
|
||||||
, octavius
|
, octavius
|
||||||
, ppxlib
|
, ppxlib
|
||||||
@ -417,6 +418,15 @@ rec {
|
|||||||
propagatedBuildInputs = [ async shell ];
|
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 {
|
core_bench = janePackage {
|
||||||
pname = "core_bench";
|
pname = "core_bench";
|
||||||
hash = "1nk0i3z8rqrljbf4bc7ljp71g0a4361nh85s2ang0lgxri74zacm";
|
hash = "1nk0i3z8rqrljbf4bc7ljp71g0a4361nh85s2ang0lgxri74zacm";
|
||||||
|
@ -137,12 +137,16 @@ let
|
|||||||
|
|
||||||
cohttp = callPackage ../development/ocaml-modules/cohttp { };
|
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 = callPackage ../development/ocaml-modules/cohttp/lwt.nix { };
|
||||||
|
|
||||||
cohttp-lwt-unix = callPackage ../development/ocaml-modules/cohttp/lwt-unix.nix { };
|
cohttp-lwt-unix = callPackage ../development/ocaml-modules/cohttp/lwt-unix.nix { };
|
||||||
|
|
||||||
conduit = callPackage ../development/ocaml-modules/conduit { };
|
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 = callPackage ../development/ocaml-modules/conduit/lwt.nix { };
|
||||||
|
|
||||||
conduit-lwt-unix = callPackage ../development/ocaml-modules/conduit/lwt-unix.nix { };
|
conduit-lwt-unix = callPackage ../development/ocaml-modules/conduit/lwt-unix.nix { };
|
||||||
@ -991,7 +995,7 @@ let
|
|||||||
janeStreet =
|
janeStreet =
|
||||||
if lib.versionOlder "4.08" ocaml.version
|
if lib.versionOlder "4.08" ocaml.version
|
||||||
then import ../development/ocaml-modules/janestreet/0.13.nix {
|
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;
|
inherit (pkgs) openssl;
|
||||||
}
|
}
|
||||||
else if lib.versionOlder "4.07" ocaml.version
|
else if lib.versionOlder "4.07" ocaml.version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user