diff options
Diffstat (limited to 'pkgs/development/ocaml-modules/lwt/default.nix')
-rw-r--r-- | pkgs/development/ocaml-modules/lwt/default.nix | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index 9ef10906365..20acb75d931 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -1,29 +1,37 @@ -{stdenv, fetchurl, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl}: +{stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4}: let - ocaml_version = (builtins.parseDrvName ocaml.name).version; - version = "2.1.1"; + version = "2.4.6"; + inherit (stdenv.lib) optional getVersion versionAtLeast; + ocaml_version = getVersion ocaml; in stdenv.mkDerivation { + + name = "ocaml-lwt-${version}"; - src = fetchurl { - url = "http://ocsigen.org/download/lwt-${version}.tar.gz"; - sha256 = "1zjn0sgihryshancn4kna1xslhc8gifliny1qd3a85f72xxxnw0w"; + src = fetchzip { + url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz"; + sha256 = "0idci0zadpb8hmblszsrvg6yf36w5a9y6rsdwjc3jww71dgrw5d9"; }; - buildInputs = [which cryptopp ocaml findlib ocaml_react ocaml_ssl]; + buildInputs = [ocaml_oasis pkgconfig which cryptopp ocaml findlib glib libev ncurses camlp4]; + + propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text ]; + + configureFlags = [ "--enable-react" "--enable-glib" "--enable-ssl" "--enable-text" "--disable-ppx" ] + ++ optional (versionAtLeast ocaml_version "4.0" && ! versionAtLeast ocaml_version "4.02") "--enable-toplevel"; - configurePhase = "true"; + createFindlibDestdir = true; - meta = { + meta = with stdenv.lib; { homepage = http://ocsigen.org/lwt; description = "Lightweight thread library for Objective Caml"; - license = "LGPL"; + license = licenses.lgpl21; platforms = ocaml.meta.platforms; - maintainers = [ - stdenv.lib.maintainers.z77z + maintainers = with maintainers; [ + z77z vbgl gal_bolle ]; }; } |