3
0
Fork 0
forked from mirrors/nixpkgs

ocamlPackages.ocaml_lwt: 3.3.0 -> 4.1.0

This commit is contained in:
Vincent Laporte 2018-09-28 15:28:36 +00:00 committed by Vincent Laporte
parent 4b1f2fb0b3
commit bdaedbe38c
8 changed files with 82 additions and 18 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, ocaml, findlib, dune, cohttp, lwt3, uri, ppx_sexp_conv }:
{ stdenv, ocaml, findlib, dune, cohttp, ocaml_lwt, uri, ppx_sexp_conv }:
if !stdenv.lib.versionAtLeast cohttp.version "0.99"
then cohttp
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ocaml findlib dune uri ppx_sexp_conv ];
propagatedBuildInputs = [ cohttp lwt3 ];
propagatedBuildInputs = [ cohttp ocaml_lwt ];
buildPhase = "dune build -p cohttp-lwt";
}

View file

@ -1,4 +1,4 @@
{ stdenv, ocaml, findlib, dune, ppx_sexp_conv, conduit, lwt3 }:
{ stdenv, ocaml, findlib, dune, ppx_sexp_conv, conduit, ocaml_lwt }:
if !stdenv.lib.versionAtLeast conduit.version "1.0"
then conduit
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ocaml findlib dune ppx_sexp_conv ];
propagatedBuildInputs = [ conduit lwt3 ];
propagatedBuildInputs = [ conduit ocaml_lwt ];
buildPhase = "dune build -p conduit-lwt";
}

View file

@ -0,0 +1,35 @@
{ stdenv, fetchzip, pkgconfig, ncurses, libev, dune
, ocaml, findlib, cppo
, ocaml-migrate-parsetree, ppx_tools_versioned, result
}:
let inherit (stdenv.lib) optional versionAtLeast; in
stdenv.mkDerivation rec {
version = "4.1.0";
name = "ocaml${ocaml.version}-lwt-${version}";
src = fetchzip {
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
sha256 = "16wnc61kfj54z4q8sn9f5iik37pswz328hcz3z6rkza3kh3s6wmm";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ocaml findlib dune cppo
ocaml-migrate-parsetree ppx_tools_versioned
] ++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
propagatedBuildInputs = [ libev result ];
configurePhase = "ocaml src/util/configure.ml -use-libev true";
buildPhase = "jbuilder build -p lwt";
inherit (dune) installPhase;
meta = {
homepage = "https://ocsigen.org/lwt/";
description = "A cooperative threads library for OCaml";
maintainers = [ stdenv.lib.maintainers.vbgl ];
license = stdenv.lib.licenses.lgpl21;
inherit (ocaml.meta) platforms;
};
}

View file

@ -1,10 +1,19 @@
{ stdenv, ocaml, findlib, dune, lwt }:
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, lwt }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "lwt_log is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
version = "1.0.0";
version = "1.1.0";
name = "ocaml${ocaml.version}-lwt_log-${version}";
inherit (lwt) src;
src = fetchFromGitHub {
owner = "aantron";
repo = "lwt_log";
rev = version;
sha256 = "1c58gkqfvyf2j11jwj2nh4iq999wj9xpnmr80hz9d0nk9fv333pi";
};
buildInputs = [ ocaml findlib dune ];

View file

@ -1,5 +1,9 @@
{ stdenv, fetchzip, ocaml, findlib, dune, ssl, lwt }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "lwt_ssl is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
version = "1.1.2";
name = "ocaml${ocaml.version}-lwt_ssl-${version}";

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, js_of_ocaml-camlp4, camlp4, lwt3, react }:
{ stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, js_of_ocaml-camlp4, camlp4, ocaml_lwt, react }:
if stdenv.lib.versionAtLeast ocaml.version "4.06"
then throw "ojquery is not available for OCaml ${ocaml.version}"
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ ocaml findlib ocamlbuild js_of_ocaml-camlp4 camlp4 ];
propagatedBuildInputs = [ js_of_ocaml lwt3 react ];
propagatedBuildInputs = [ js_of_ocaml ocaml_lwt react ];
createFindlibDestdir = true;

View file

@ -238,7 +238,16 @@ let
easy-format = callPackage ../development/ocaml-modules/easy-format { };
eliom = callPackage ../development/ocaml-modules/eliom { };
eliom = callPackage ../development/ocaml-modules/eliom {
js_of_ocaml-lwt = js_of_ocaml-lwt.override {
ocaml_lwt = lwt3;
lwt_log = lib.overrideDerivation
(lwt_log.override { lwt = lwt3; })
(_: { inherit (lwt3) src; });
};
lwt_react = lwt_react.override { lwt = lwt3; };
lwt_ssl = lwt_ssl.override { lwt = lwt3; };
};
elpi = callPackage ../development/ocaml-modules/elpi { };
@ -401,25 +410,27 @@ let
lwt2 = callPackage ../development/ocaml-modules/lwt/legacy.nix { };
lwt3 = if lib.versionOlder "4.02" ocaml.version
then callPackage ../development/ocaml-modules/lwt { }
then callPackage ../development/ocaml-modules/lwt/3.x.nix { }
else throw "lwt3 is not available for OCaml ${ocaml.version}";
ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt3 else lwt2;
lwt4 = callPackage ../development/ocaml-modules/lwt/4.x.nix { };
ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt4 else lwt2;
lwt_log = callPackage ../development/ocaml-modules/lwt_log {
lwt = lwt3;
lwt = lwt4;
};
lwt_ppx = callPackage ../development/ocaml-modules/lwt/ppx.nix {
lwt = lwt3;
lwt = ocaml_lwt;
};
lwt_react = callPackage ../development/ocaml-modules/lwt_react {
lwt = lwt3;
lwt = ocaml_lwt;
};
lwt_ssl = callPackage ../development/ocaml-modules/lwt_ssl {
lwt = lwt3;
lwt = ocaml_lwt;
};
macaque = callPackage ../development/ocaml-modules/macaque { };
@ -535,7 +546,10 @@ let
ocplib-simplex = callPackage ../development/ocaml-modules/ocplib-simplex { };
ocsigen_server = callPackage ../development/ocaml-modules/ocsigen-server { };
ocsigen_server = callPackage ../development/ocaml-modules/ocsigen-server {
lwt_react = lwt_react.override { lwt = lwt3; };
lwt_ssl = lwt_ssl.override { lwt = lwt3; };
};
ocsigen-start = callPackage ../development/ocaml-modules/ocsigen-start { };
@ -545,7 +559,9 @@ let
odoc = callPackage ../development/ocaml-modules/odoc { };
ojquery = callPackage ../development/ocaml-modules/ojquery { };
ojquery = callPackage ../development/ocaml-modules/ojquery {
ocaml_lwt = lwt3;
};
omd = callPackage ../development/ocaml-modules/omd { };