From 87cb88b71f41f15708a45dedee07e8b2d627d014 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Thu, 9 Jul 2020 20:50:52 -0400 Subject: [PATCH 1/5] ocamlPackages.async_ssl: init at 0.13 --- pkgs/development/ocaml-modules/janestreet/0.13.nix | 10 ++++++++++ pkgs/top-level/ocaml-packages.nix | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/janestreet/0.13.nix b/pkgs/development/ocaml-modules/janestreet/0.13.nix index d16ceefd04c..b92027a65a0 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.13.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.13.nix @@ -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"; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index a9bea0a60f6..c06ce3eeae2 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -991,7 +991,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 From 97c4b3934c5435c5c2f5ae63c46ef32dbd02c2ad Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Thu, 9 Jul 2020 20:51:22 -0400 Subject: [PATCH 2/5] ocamlPackages.conduit-async: init at 2.2.2 --- .../ocaml-modules/conduit/async.nix | 18 ++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/development/ocaml-modules/conduit/async.nix diff --git a/pkgs/development/ocaml-modules/conduit/async.nix b/pkgs/development/ocaml-modules/conduit/async.nix new file mode 100644 index 00000000000..1c5834c415a --- /dev/null +++ b/pkgs/development/ocaml-modules/conduit/async.nix @@ -0,0 +1,18 @@ +{ stdenv, buildDunePackage, async, ppx_sexp_conv, conduit }: + +if !stdenv.lib.versionAtLeast conduit.version "1.0" +then conduit +else + +buildDunePackage { + pname = "conduit-async"; + inherit (conduit) version src; + + buildInputs = [ ppx_sexp_conv ]; + + propagatedBuildInputs = [ async conduit ]; + + meta = conduit.meta // { + description = "A network connection establishment library for Async"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index c06ce3eeae2..d9937829b93 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -143,6 +143,8 @@ let 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 { }; From 94790b2949b5157b0ec6d5dbc14b253f5fa4dea6 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Sat, 11 Jul 2020 23:08:08 -0400 Subject: [PATCH 3/5] ocamlPackages.conduit: Update description --- pkgs/development/ocaml-modules/conduit/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/conduit/default.nix b/pkgs/development/ocaml-modules/conduit/default.nix index 7fbeefb3926..27b2a329b26 100644 --- a/pkgs/development/ocaml-modules/conduit/default.nix +++ b/pkgs/development/ocaml-modules/conduit/default.nix @@ -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"; From 48e06000c2b29277edf6c840e613c337990e77f0 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Thu, 9 Jul 2020 20:51:58 -0400 Subject: [PATCH 4/5] ocamlPackages.cohttp-async: init at 2.5.1 --- .../ocaml-modules/cohttp/async.nix | 21 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/ocaml-modules/cohttp/async.nix diff --git a/pkgs/development/ocaml-modules/cohttp/async.nix b/pkgs/development/ocaml-modules/cohttp/async.nix new file mode 100644 index 00000000000..23e6f4f10a1 --- /dev/null +++ b/pkgs/development/ocaml-modules/cohttp/async.nix @@ -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"; + }; + } diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d9937829b93..ba02c3bb524 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -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 { }; From 91337f4169454333837ab3f87802326d7e362f78 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Mon, 25 May 2020 19:23:05 -0400 Subject: [PATCH 5/5] ocamlPackages.conduit-async: Add async_ssl to propagatedBuildInputs --- pkgs/development/ocaml-modules/cohttp/async.nix | 1 + pkgs/development/ocaml-modules/conduit/async.nix | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/cohttp/async.nix b/pkgs/development/ocaml-modules/cohttp/async.nix index 23e6f4f10a1..246397b6081 100644 --- a/pkgs/development/ocaml-modules/cohttp/async.nix +++ b/pkgs/development/ocaml-modules/cohttp/async.nix @@ -9,6 +9,7 @@ else buildDunePackage { pname = "cohttp-async"; + useDune2 = true; inherit (cohttp) version src; buildInputs = [ ppx_sexp_conv ]; diff --git a/pkgs/development/ocaml-modules/conduit/async.nix b/pkgs/development/ocaml-modules/conduit/async.nix index 1c5834c415a..f16819ed8ae 100644 --- a/pkgs/development/ocaml-modules/conduit/async.nix +++ b/pkgs/development/ocaml-modules/conduit/async.nix @@ -1,4 +1,4 @@ -{ stdenv, buildDunePackage, async, ppx_sexp_conv, conduit }: +{ stdenv, buildDunePackage, async, async_ssl, ppx_sexp_conv, conduit }: if !stdenv.lib.versionAtLeast conduit.version "1.0" then conduit @@ -6,11 +6,12 @@ else buildDunePackage { pname = "conduit-async"; + useDune2 = true; inherit (conduit) version src; buildInputs = [ ppx_sexp_conv ]; - propagatedBuildInputs = [ async conduit ]; + propagatedBuildInputs = [ async async_ssl conduit ]; meta = conduit.meta // { description = "A network connection establishment library for Async";