ocamlPackages.lwt3: 3.0.0 -> 3.3.0
This commit is contained in:
parent
73a7d67795
commit
0b53d63dad
|
@ -1,57 +1,36 @@
|
||||||
{ stdenv, buildOcaml, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4
|
{ stdenv, fetchzip, pkgconfig, ncurses, libev, jbuilder
|
||||||
, react, ssl, libev, pkgconfig, ncurses, glib
|
, ocaml, findlib, camlp4, cppo
|
||||||
, ppx_tools, result, cppo
|
, ocaml-migrate-parsetree, ppx_tools_versioned, result
|
||||||
, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
||||||
, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0"
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
if !stdenv.lib.versionAtLeast ocaml.version "4"
|
stdenv.mkDerivation rec {
|
||||||
then throw "lwt is not available for OCaml ${ocaml.version}"
|
version = "3.3.0";
|
||||||
else
|
name = "ocaml${ocaml.version}-lwt-${version}";
|
||||||
|
|
||||||
let sha256 = {
|
|
||||||
"3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88";
|
|
||||||
"2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
|
|
||||||
"2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
|
|
||||||
}."${version}"; in
|
|
||||||
|
|
||||||
let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in
|
|
||||||
|
|
||||||
buildOcaml rec {
|
|
||||||
name = "lwt";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
|
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
|
||||||
inherit sha256;
|
sha256 = "0n87hcyl4svy0risj439wyfq6bl77qxq3nraqgdr1qbz5lskbq2j";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
ocaml src/util/configure.ml -use-libev true -use-camlp4 true
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ]
|
buildInputs = [ ncurses ocaml findlib jbuilder camlp4 cppo
|
||||||
++ stdenv.lib.optional ppxSupport ppx_tools;
|
ocaml-migrate-parsetree ppx_tools_versioned ];
|
||||||
|
propagatedBuildInputs = [ libev result ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ result ]
|
installPhase = ''
|
||||||
++ optionals [ react ssl ]
|
ocaml src/util/install_filter.ml
|
||||||
++ [ libev ];
|
${jbuilder.installPhase}
|
||||||
|
'';
|
||||||
|
|
||||||
configureScript = "ocaml setup.ml -configure";
|
meta = {
|
||||||
prefixKey = "--prefix ";
|
homepage = "https://ocsigen.org/lwt/";
|
||||||
configureFlags =
|
description = "A cooperative threads library for OCaml";
|
||||||
optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ]
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
||||||
++ [ "--enable-camlp4" ]
|
license = stdenv.lib.licenses.lgpl21;
|
||||||
++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ];
|
inherit (ocaml.meta) platforms;
|
||||||
|
|
||||||
createFindlibDestdir = true;
|
|
||||||
|
|
||||||
hasSharedObjects = true;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
homepage = http://ocsigen.org/lwt;
|
|
||||||
description = "Lightweight thread library for Objective Caml";
|
|
||||||
license = licenses.lgpl21;
|
|
||||||
platforms = ocaml.meta.platforms or [];
|
|
||||||
maintainers = with maintainers; [
|
|
||||||
z77z vbgl gal_bolle
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
{ stdenv, buildOcaml, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4
|
||||||
|
, react, ssl, libev, pkgconfig, ncurses, glib
|
||||||
|
, ppx_tools, result, cppo
|
||||||
|
, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
|
||||||
|
, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0"
|
||||||
|
}:
|
||||||
|
|
||||||
|
if !stdenv.lib.versionAtLeast ocaml.version "4"
|
||||||
|
then throw "lwt is not available for OCaml ${ocaml.version}"
|
||||||
|
else
|
||||||
|
|
||||||
|
let sha256 = {
|
||||||
|
"3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88";
|
||||||
|
"2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
|
||||||
|
"2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
|
||||||
|
}."${version}"; in
|
||||||
|
|
||||||
|
let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in
|
||||||
|
|
||||||
|
buildOcaml rec {
|
||||||
|
name = "lwt";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = fetchzip {
|
||||||
|
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
buildInputs = [ which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ]
|
||||||
|
++ stdenv.lib.optional ppxSupport ppx_tools;
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ result ]
|
||||||
|
++ optionals [ react ssl ]
|
||||||
|
++ [ libev ];
|
||||||
|
|
||||||
|
configureScript = "ocaml setup.ml -configure";
|
||||||
|
prefixKey = "--prefix ";
|
||||||
|
configureFlags =
|
||||||
|
optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ]
|
||||||
|
++ [ "--enable-camlp4" ]
|
||||||
|
++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ];
|
||||||
|
|
||||||
|
createFindlibDestdir = true;
|
||||||
|
|
||||||
|
hasSharedObjects = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = http://ocsigen.org/lwt;
|
||||||
|
description = "Lightweight thread library for Objective Caml";
|
||||||
|
license = licenses.lgpl21;
|
||||||
|
platforms = ocaml.meta.platforms or [];
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
z77z vbgl gal_bolle
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -366,12 +366,10 @@ let
|
||||||
|
|
||||||
lru = callPackage ../development/ocaml-modules/lru { };
|
lru = callPackage ../development/ocaml-modules/lru { };
|
||||||
|
|
||||||
lwt2 = callPackage ../development/ocaml-modules/lwt { };
|
lwt2 = callPackage ../development/ocaml-modules/lwt/legacy.nix { };
|
||||||
|
|
||||||
lwt3 = if lib.versionOlder "4.02" ocaml.version
|
lwt3 = if lib.versionOlder "4.02" ocaml.version
|
||||||
then callPackage ../development/ocaml-modules/lwt {
|
then callPackage ../development/ocaml-modules/lwt { }
|
||||||
version = "3.0.0";
|
|
||||||
}
|
|
||||||
else throw "lwt3 is not available for OCaml ${ocaml.version}";
|
else throw "lwt3 is not available for OCaml ${ocaml.version}";
|
||||||
|
|
||||||
ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt3 else lwt2;
|
ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt3 else lwt2;
|
||||||
|
@ -650,7 +648,9 @@ let
|
||||||
|
|
||||||
ssl = callPackage ../development/ocaml-modules/ssl { };
|
ssl = callPackage ../development/ocaml-modules/ssl { };
|
||||||
|
|
||||||
stog = callPackage ../applications/misc/stog { };
|
stog = callPackage ../applications/misc/stog {
|
||||||
|
ocaml_lwt = lwt2;
|
||||||
|
};
|
||||||
|
|
||||||
stringext = callPackage ../development/ocaml-modules/stringext { };
|
stringext = callPackage ../development/ocaml-modules/stringext { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue