Skip to content

Commit

Permalink
ocamlPackages.cohttp: 0.22.0 -> 0.99.0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vbgl committed Aug 27, 2017
1 parent f5068aa commit 724504e
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 29 deletions.
19 changes: 8 additions & 11 deletions pkgs/development/ocaml-modules/cohttp/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
19 changes: 19 additions & 0 deletions pkgs/development/ocaml-modules/cohttp/lwt-unix.nix
Original file line number Diff line number Diff line change
@@ -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";
}
16 changes: 16 additions & 0 deletions pkgs/development/ocaml-modules/cohttp/lwt.nix
Original file line number Diff line number Diff line change
@@ -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";
}
22 changes: 10 additions & 12 deletions pkgs/development/ocaml-modules/conduit/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
18 changes: 18 additions & 0 deletions pkgs/development/ocaml-modules/conduit/lwt-unix.nix
Original file line number Diff line number Diff line change
@@ -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";
}
16 changes: 16 additions & 0 deletions pkgs/development/ocaml-modules/conduit/lwt.nix
Original file line number Diff line number Diff line change
@@ -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";
}
4 changes: 2 additions & 2 deletions pkgs/development/ocaml-modules/git-http/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ stdenv, ocaml, findlib, jbuilder, git, cohttp }:
{ stdenv, ocaml, findlib, jbuilder, git, cohttp-lwt }:

stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-git-http-${version}";
inherit (git) version src;

buildInputs = [ ocaml findlib jbuilder ];

propagatedBuildInputs = [ git cohttp ];
propagatedBuildInputs = [ git cohttp-lwt ];

buildPhase = "jbuilder build -p git-http";

Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/ocaml-modules/git-unix/default.nix
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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";

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/ocaml-modules/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
8 changes: 8 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -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 { };
Expand Down

0 comments on commit 724504e

Please sign in to comment.