nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix

39 lines
1.3 KiB
Nix
Raw Normal View History

2015-10-14 08:21:36 +02:00
{ stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4, ppx_tools }:
let
2015-02-16 11:23:43 +01:00
version = "2.4.6";
inherit (stdenv.lib) optional getVersion versionAtLeast;
ocaml_version = getVersion ocaml;
in
stdenv.mkDerivation {
name = "ocaml-lwt-${version}";
2015-02-16 11:23:43 +01:00
src = fetchzip {
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
sha256 = "0idci0zadpb8hmblszsrvg6yf36w5a9y6rsdwjc3jww71dgrw5d9";
};
2015-10-14 08:21:36 +02:00
buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib glib ncurses camlp4 ppx_tools ];
2014-07-18 17:04:16 +02:00
propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text libev ];
2015-10-14 08:21:36 +02:00
configureFlags = [ "--enable-react" "--enable-glib" "--enable-ssl" "--enable-text" ]
++ [ (if versionAtLeast ocaml_version "4.02" then "--enable-ppx" else "--disable-ppx") ]
++ optional (versionAtLeast ocaml_version "4.0" && ! versionAtLeast ocaml_version "4.02") "--enable-toplevel";
createFindlibDestdir = true;
meta = with stdenv.lib; {
homepage = http://ocsigen.org/lwt;
description = "Lightweight thread library for Objective Caml";
license = licenses.lgpl21;
platforms = ocaml.meta.platforms;
maintainers = with maintainers; [
z77z vbgl gal_bolle
];
};
}