From 724504e0da4b6491dbc2517c685d65cf7f4f4134 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 27 Aug 2017 19:00:55 +0000 Subject: [PATCH] ocamlPackages.cohttp: 0.22.0 -> 0.99.0 ocamlPackages.conduit: 0.15.4 -> 1.0.0 ocamlPackages.cohttp-lwt: init at 0.99.0 ocamlPackages.cohttp-lwt-unix: init at 0.99.0 ocamlPackages.conduit-lwt: init at 1.0.0 ocamlPackages.conduit-lwt-unix: init at 1.0.0 ocamlPackages.git: 1.11.1 -> 1.11.2 --- .../ocaml-modules/cohttp/default.nix | 19 +++++++--------- .../ocaml-modules/cohttp/lwt-unix.nix | 19 ++++++++++++++++ pkgs/development/ocaml-modules/cohttp/lwt.nix | 16 ++++++++++++++ .../ocaml-modules/conduit/default.nix | 22 +++++++++---------- .../ocaml-modules/conduit/lwt-unix.nix | 18 +++++++++++++++ .../development/ocaml-modules/conduit/lwt.nix | 16 ++++++++++++++ .../ocaml-modules/git-http/default.nix | 4 ++-- .../ocaml-modules/git-unix/default.nix | 5 +++-- .../development/ocaml-modules/git/default.nix | 4 ++-- pkgs/top-level/ocaml-packages.nix | 8 +++++++ 10 files changed, 102 insertions(+), 29 deletions(-) create mode 100644 pkgs/development/ocaml-modules/cohttp/lwt-unix.nix create mode 100644 pkgs/development/ocaml-modules/cohttp/lwt.nix create mode 100644 pkgs/development/ocaml-modules/conduit/lwt-unix.nix create mode 100644 pkgs/development/ocaml-modules/conduit/lwt.nix diff --git a/pkgs/development/ocaml-modules/cohttp/default.nix b/pkgs/development/ocaml-modules/cohttp/default.nix index 1fd4446f1ee9..adde3094e27f 100644 --- a/pkgs/development/ocaml-modules/cohttp/default.nix +++ b/pkgs/development/ocaml-modules/cohttp/default.nix @@ -1,29 +1,26 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild +{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder , ppx_fields_conv, ppx_sexp_conv -, base64, fieldslib, uri, conduit -# Optional for async and lwt support: -, async , async_ssl, cmdliner, fmt, magic-mime, ocaml_lwt, tls +, base64, fieldslib, jsonm, logs, re, stringext, uri }: stdenv.mkDerivation rec { - version = "0.22.0"; + version = "0.99.0"; name = "ocaml${ocaml.version}-cohttp-${version}"; src = fetchFromGitHub { owner = "mirage"; repo = "ocaml-cohttp"; rev = "v${version}"; - sha256 = "1iy4ynh0yrw8337nsa9zvgcf476im0bhccsbs0vki3c5yxw2x60d"; + sha256 = "0y8qhzfwrc6486apmp2rsj822cnfhnz4w8rsb52w5wqmsgjxx1bj"; }; - buildInputs = [ ocaml findlib ocamlbuild ppx_fields_conv ppx_sexp_conv conduit - async async_ssl cmdliner fmt magic-mime ocaml_lwt tls ]; + buildInputs = [ ocaml findlib jbuilder jsonm ppx_fields_conv ppx_sexp_conv ]; - propagatedBuildInputs = [ base64 fieldslib uri ]; + propagatedBuildInputs = [ base64 fieldslib re stringext uri ]; - makeFlags = [ "PREFIX=$(out)" ]; + buildPhase = "jbuilder build -p cohttp"; - createFindlibDestdir = true; + inherit (jbuilder) installPhase; meta = { description = "HTTP(S) library for Lwt, Async and Mirage"; diff --git a/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix b/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix new file mode 100644 index 000000000000..c526a101dd9d --- /dev/null +++ b/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix @@ -0,0 +1,19 @@ +{ stdenv, ocaml, findlib, jbuilder, cohttp-lwt +, conduit-lwt-unix, ppx_sexp_conv +, cmdliner, fmt, magic-mime +}: + +if !stdenv.lib.versionAtLeast cohttp-lwt.version "0.99" +then cohttp-lwt +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-cohttp-lwt-unix-${version}"; + inherit (cohttp-lwt) version src installPhase meta; + + buildInputs = [ ocaml findlib jbuilder cmdliner ppx_sexp_conv ]; + + propagatedBuildInputs = [ cohttp-lwt conduit-lwt-unix fmt magic-mime ]; + + buildPhase = "jbuilder build -p cohttp-lwt-unix"; +} diff --git a/pkgs/development/ocaml-modules/cohttp/lwt.nix b/pkgs/development/ocaml-modules/cohttp/lwt.nix new file mode 100644 index 000000000000..21bea646d721 --- /dev/null +++ b/pkgs/development/ocaml-modules/cohttp/lwt.nix @@ -0,0 +1,16 @@ +{ stdenv, ocaml, findlib, jbuilder, cohttp, lwt3, uri, ppx_sexp_conv }: + +if !stdenv.lib.versionAtLeast cohttp.version "0.99" +then cohttp +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-cohttp-lwt-${version}"; + inherit (cohttp) version src installPhase meta; + + buildInputs = [ ocaml findlib jbuilder uri ppx_sexp_conv ]; + + propagatedBuildInputs = [ cohttp lwt3 ]; + + buildPhase = "jbuilder build -p cohttp-lwt"; +} diff --git a/pkgs/development/ocaml-modules/conduit/default.nix b/pkgs/development/ocaml-modules/conduit/default.nix index 750bded28938..98ac997383c7 100644 --- a/pkgs/development/ocaml-modules/conduit/default.nix +++ b/pkgs/development/ocaml-modules/conduit/default.nix @@ -1,27 +1,25 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild -, ppx_driver, ppx_sexp_conv -, ipaddr, uri, logs -, ocaml_lwt ? null -, async ? null, async_ssl ? null -, tls ? null +{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder +, ppx_sexp_conv +, astring, ipaddr, uri }: stdenv.mkDerivation rec { - version = "0.15.4"; + version = "1.0.0"; name = "ocaml${ocaml.version}-conduit-${version}"; src = fetchFromGitHub { owner = "mirage"; repo = "ocaml-conduit"; rev = "v${version}"; - sha256 = "1ya7jqvhl8hc22cid5myf31w5c473imdxjnl9785lavsqj3djjxq"; + sha256 = "1ryigzh7sfif1mly624fpm87aw5h60n5wzdlrvqsf71qcpxc6iiz"; }; - buildInputs = [ ocaml findlib ocamlbuild ppx_driver ppx_sexp_conv - ocaml_lwt async async_ssl tls ]; - propagatedBuildInputs = [ ipaddr uri logs ]; + buildInputs = [ ocaml findlib jbuilder ppx_sexp_conv ]; + propagatedBuildInputs = [ astring ipaddr uri ]; - createFindlibDestdir = true; + buildPhase = "jbuilder build -p conduit"; + + inherit (jbuilder) installPhase; meta = { description = "Network connection library for TCP and SSL"; diff --git a/pkgs/development/ocaml-modules/conduit/lwt-unix.nix b/pkgs/development/ocaml-modules/conduit/lwt-unix.nix new file mode 100644 index 000000000000..ce7a33a11eed --- /dev/null +++ b/pkgs/development/ocaml-modules/conduit/lwt-unix.nix @@ -0,0 +1,18 @@ +{ stdenv, ocaml, findlib, jbuilder, conduit-lwt +, logs, ppx_sexp_conv +}: + +if !stdenv.lib.versionAtLeast conduit-lwt.version "1.0" +then conduit-lwt +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-conduit-lwt-unix-${version}"; + inherit (conduit-lwt) version src installPhase meta; + + buildInputs = [ ocaml findlib jbuilder ppx_sexp_conv ]; + + propagatedBuildInputs = [ conduit-lwt logs ]; + + buildPhase = "jbuilder build -p conduit-lwt-unix"; +} diff --git a/pkgs/development/ocaml-modules/conduit/lwt.nix b/pkgs/development/ocaml-modules/conduit/lwt.nix new file mode 100644 index 000000000000..8ee3d827ecc1 --- /dev/null +++ b/pkgs/development/ocaml-modules/conduit/lwt.nix @@ -0,0 +1,16 @@ +{ stdenv, ocaml, findlib, jbuilder, ppx_sexp_conv, conduit, lwt3 }: + +if !stdenv.lib.versionAtLeast conduit.version "1.0" +then conduit +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-conduit-lwt-${version}"; + inherit (conduit) version src installPhase meta; + + buildInputs = [ ocaml findlib jbuilder ppx_sexp_conv ]; + + propagatedBuildInputs = [ conduit lwt3 ]; + + buildPhase = "jbuilder build -p conduit-lwt"; +} diff --git a/pkgs/development/ocaml-modules/git-http/default.nix b/pkgs/development/ocaml-modules/git-http/default.nix index 7df47b093b35..5b93b9607658 100644 --- a/pkgs/development/ocaml-modules/git-http/default.nix +++ b/pkgs/development/ocaml-modules/git-http/default.nix @@ -1,4 +1,4 @@ -{ stdenv, ocaml, findlib, jbuilder, git, cohttp }: +{ stdenv, ocaml, findlib, jbuilder, git, cohttp-lwt }: stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-git-http-${version}"; @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { buildInputs = [ ocaml findlib jbuilder ]; - propagatedBuildInputs = [ git cohttp ]; + propagatedBuildInputs = [ git cohttp-lwt ]; buildPhase = "jbuilder build -p git-http"; diff --git a/pkgs/development/ocaml-modules/git-unix/default.nix b/pkgs/development/ocaml-modules/git-unix/default.nix index 1fd4fd926492..189388efe324 100644 --- a/pkgs/development/ocaml-modules/git-unix/default.nix +++ b/pkgs/development/ocaml-modules/git-unix/default.nix @@ -1,5 +1,6 @@ { stdenv, ocaml, findlib, jbuilder, git-http -, ocaml_lwt, tls, conduit, magic-mime, cmdliner, mtime +, cohttp-lwt-unix +, tls, magic-mime, cmdliner, mtime }: stdenv.mkDerivation rec { @@ -8,7 +9,7 @@ stdenv.mkDerivation rec { buildInputs = [ ocaml findlib jbuilder cmdliner mtime ]; - propagatedBuildInputs = [ conduit git-http magic-mime ocaml_lwt tls ]; + propagatedBuildInputs = [ cohttp-lwt-unix git-http tls ]; buildPhase = "jbuilder build -p git-unix"; diff --git a/pkgs/development/ocaml-modules/git/default.nix b/pkgs/development/ocaml-modules/git/default.nix index e3b4b4333e1a..4d4f86e57eb4 100644 --- a/pkgs/development/ocaml-modules/git/default.nix +++ b/pkgs/development/ocaml-modules/git/default.nix @@ -3,14 +3,14 @@ }: stdenv.mkDerivation rec { - version = "1.11.1"; + version = "1.11.2"; name = "ocaml${ocaml.version}-git-${version}"; src = fetchFromGitHub { owner = "mirage"; repo = "ocaml-git"; rev = version; - sha256 = "04az2bpbhgdhh7y6pagqx4wf3jbmqrm8w20dgimpbj5h3hnak744"; + sha256 = "1z5b0g4vck1sh1w076i2p3ppxrmb9h30q3nip5snw2r9prkm6y1j"; }; buildInputs = [ ocaml findlib jbuilder ]; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index ba75adb77d0c..64656990d0e4 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -137,6 +137,10 @@ let then callPackage ../development/ocaml-modules/cohttp { } else cohttp_p4; + cohttp-lwt = callPackage ../development/ocaml-modules/cohttp/lwt.nix { }; + + cohttp-lwt-unix = callPackage ../development/ocaml-modules/cohttp/lwt-unix.nix { }; + conduit_p4 = callPackage ../development/ocaml-modules/conduit/0.10.0.nix { lwt = lwt2; }; @@ -146,6 +150,10 @@ let then callPackage ../development/ocaml-modules/conduit { } else conduit_p4; + conduit-lwt = callPackage ../development/ocaml-modules/conduit/lwt.nix { }; + + conduit-lwt-unix = callPackage ../development/ocaml-modules/conduit/lwt-unix.nix { }; + config-file = callPackage ../development/ocaml-modules/config-file { }; containers = callPackage ../development/ocaml-modules/containers { };