@@ -1,24 +1,27 @@
1−{ stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4, ppx_tools }:
2−
3−let
4− inherit (stdenv.lib) optional getVersion versionAtLeast;
5−in
1+{ stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4
2+, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, glib
3+, ppx_tools, result
4+, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
5+}:
66
77stdenv.mkDerivation rec {
88 name = "ocaml-lwt-${version}";
9− version = "2.5.2";
9+ version = "2.6.0";
1010
1111 src = fetchzip {
1212 url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
13− sha256 = "0gmhm282r8yi0gwcv0g2s7qchkfjmhqbqf4j9frlyv665ink9kxl";
13+ sha256 = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
1414 };
1515
16− buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 ppx_tools ];
16+ buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 ]
17+ ++ stdenv.lib.optional ppxSupport ppx_tools;
1718
18− propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text libev ];
19+ propagatedBuildInputs = [ result ocaml_react ocaml_ssl libev ];
1920
20− configureFlags = [ "--enable-glib" "--enable-ssl" "--enable-react" "--enable-camlp4"]
21− ++ [ (if versionAtLeast ocaml.version "4.02" then "--enable-ppx" else "--disable-ppx") ];
21+ configureScript = "ocaml setup.ml -configure";
22+ prefixKey = "--prefix ";
23+ configureFlags = [ "--enable-glib" "--enable-ssl" "--enable-react" "--enable-camlp4" ]
24+ ++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ];
2225
2326 createFindlibDestdir = true;
2427