2017-04-22 20:33:09 +02:00
|
|
|
{ stdenv, buildOcaml, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4
|
2017-11-01 04:40:38 +01:00
|
|
|
, react, ssl, libev, pkgconfig, ncurses, glib
|
2017-04-13 21:26:05 +02:00
|
|
|
, ppx_tools, result, cppo
|
2016-11-21 19:20:43 +01:00
|
|
|
, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
|
2017-07-02 13:06:16 +02:00
|
|
|
, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0"
|
2016-11-21 19:20:43 +01:00
|
|
|
}:
|
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
2010-12-09 16:40:04 +01:00
|
|
|
|
2017-07-03 23:58:46 +02:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4"
|
|
|
|
then throw "lwt is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2017-07-02 13:06:16 +02:00
|
|
|
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
|
2017-04-13 21:26:05 +02:00
|
|
|
|
2017-04-22 20:33:09 +02:00
|
|
|
buildOcaml rec {
|
|
|
|
name = "lwt";
|
2017-07-02 13:06:16 +02:00
|
|
|
inherit version;
|
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
2010-12-09 16:40:04 +01:00
|
|
|
|
2015-02-16 11:23:43 +01:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
|
2017-07-02 13:06:16 +02:00
|
|
|
inherit sha256;
|
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
2010-12-09 16:40:04 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-11-01 04:40:38 +01:00
|
|
|
buildInputs = [ which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ]
|
2016-11-21 19:20:43 +01:00
|
|
|
++ stdenv.lib.optional ppxSupport ppx_tools;
|
2014-07-18 17:04:16 +02:00
|
|
|
|
2017-07-02 13:06:16 +02:00
|
|
|
propagatedBuildInputs = [ result ]
|
2017-10-05 19:09:50 +02:00
|
|
|
++ optionals [ react ssl ]
|
2017-07-02 13:06:16 +02:00
|
|
|
++ [ libev ];
|
2014-05-17 20:01:45 +02:00
|
|
|
|
2016-11-21 19:20:43 +01:00
|
|
|
configureScript = "ocaml setup.ml -configure";
|
|
|
|
prefixKey = "--prefix ";
|
2017-07-02 13:06:16 +02:00
|
|
|
configureFlags =
|
|
|
|
optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ]
|
|
|
|
++ [ "--enable-camlp4" ]
|
2016-11-21 19:20:43 +01:00
|
|
|
++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ];
|
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
2010-12-09 16:40:04 +01:00
|
|
|
|
2014-05-17 20:01:45 +02:00
|
|
|
createFindlibDestdir = true;
|
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
2010-12-09 16:40:04 +01:00
|
|
|
|
2017-04-22 20:33:09 +02:00
|
|
|
hasSharedObjects = true;
|
|
|
|
|
2014-11-03 21:04:48 +01:00
|
|
|
meta = with stdenv.lib; {
|
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
2010-12-09 16:40:04 +01:00
|
|
|
homepage = http://ocsigen.org/lwt;
|
|
|
|
description = "Lightweight thread library for Objective Caml";
|
2014-11-03 21:04:48 +01:00
|
|
|
license = licenses.lgpl21;
|
2015-12-24 18:49:07 +01:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-11-03 21:04:48 +01:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
z77z vbgl gal_bolle
|
* Enable hydra build for ocaml-batteries, camlzip, camomile, ocaml-cryptgps, cryptokit, ocaml-lwt, menhir, ounit, ocaml-pcre, ocaml-react, ocaml-ssl
svn path=/nixpkgs/trunk/; revision=25064
2010-12-11 15:50:45 +01:00
|
|
|
];
|
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
2010-12-09 16:40:04 +01:00
|
|
|
};
|
|
|
|
}
|