@@ -1,58 +0,0 @@
1−{ stdenv, buildOcaml, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4
2−, react, ssl, libev, pkgconfig, ncurses, glib
3−, ppx_tools, result, cppo
4−, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
5−, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0"
6−}:
7−
8−if !stdenv.lib.versionAtLeast ocaml.version "4"
9− || stdenv.lib.versionAtLeast ocaml.version "4.06"
10−then throw "lwt is not available for OCaml ${ocaml.version}"
11−else
12−
13−let sha256 = {
14− "3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88";
15− "2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
16− "2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
17−}.${version}; in
18−
19−let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in
20−
21−buildOcaml {
22− name = "lwt";
23− inherit version;
24−
25− src = fetchzip {
26− url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
27− inherit sha256;
28− };
29−
30− nativeBuildInputs = [ pkgconfig ];
31− buildInputs = [ which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ]
32− ++ stdenv.lib.optional ppxSupport ppx_tools;
33−
34− propagatedBuildInputs = [ result ]
35− ++ optionals [ react ssl ]
36− ++ [ libev ];
37−
38− configureScript = "ocaml setup.ml -configure";
39− prefixKey = "--prefix ";
40− configureFlags =
41− optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ]
42− ++ [ "--enable-camlp4" ]
43− ++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ];
44−
45− createFindlibDestdir = true;
46−
47− hasSharedObjects = true;
48−
49− meta = with stdenv.lib; {
50− homepage = "http://ocsigen.org/lwt";
51− description = "Lightweight thread library for Objective Caml";
52− license = licenses.lgpl21;
53− platforms = ocaml.meta.platforms or [];
54− maintainers = with maintainers; [
55− maggesi vbgl gal_bolle
56− ];
57− };
58−}