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

38 lines
1.1 KiB
Nix
Raw Normal View History

2015-10-14 07:21:36 +01:00
{ stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4, ppx_tools }:
let
2016-01-01 16:37:36 +00:00
version = "2.5.0";
inherit (stdenv.lib) optional getVersion versionAtLeast;
ocaml_version = getVersion ocaml;
in
stdenv.mkDerivation {
name = "ocaml-lwt-${version}";
2015-02-16 10:23:43 +00:00
src = fetchzip {
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
2016-01-01 16:37:36 +00:00
sha256 = "0jgg51aqbnia33l7bhgirnfpqybjwzpd85qzzd9znnc1a27gv8vr";
};
2015-10-14 07:21:36 +01:00
buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib glib ncurses camlp4 ppx_tools ];
2014-07-18 16:04:16 +01:00
propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text libev ];
2016-01-01 16:37:36 +00:00
configureFlags = [ "--enable-glib" "--enable-ssl" "--enable-react" "--enable-camlp4"]
++ [ (if versionAtLeast ocaml_version "4.02" then "--enable-ppx" else "--disable-ppx") ];
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 or [];
maintainers = with maintainers; [
z77z vbgl gal_bolle
];
};
}