nixpkgs/pkgs/development/ocaml-modules/lwt/3.x.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2018-09-05 16:11:47 +00:00
{ stdenv, fetchzip, pkgconfig, ncurses, libev, dune
, ocaml, findlib, cppo
2018-03-25 18:26:39 +00:00
, ocaml-migrate-parsetree, ppx_tools_versioned, result
, withP4 ? true
, camlp4 ? null
2016-11-21 18:20:43 +00:00
}:
2018-03-25 18:26:39 +00:00
stdenv.mkDerivation rec {
version = "3.3.0";
name = "ocaml${ocaml.version}-lwt-${version}";
2015-02-16 10:23:43 +00:00
src = fetchzip {
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
2018-03-25 18:26:39 +00:00
sha256 = "0n87hcyl4svy0risj439wyfq6bl77qxq3nraqgdr1qbz5lskbq2j";
};
2018-03-25 18:26:39 +00:00
preConfigure = ''
ocaml src/util/configure.ml -use-libev true -use-camlp4 ${if withP4 then "true" else "false"}
2018-03-25 18:26:39 +00:00
'';
2018-03-25 18:26:39 +00:00
nativeBuildInputs = [ pkgconfig ];
2018-09-05 16:11:47 +00:00
buildInputs = [ ncurses ocaml findlib dune cppo
ocaml-migrate-parsetree ppx_tools_versioned ]
++ stdenv.lib.optional withP4 camlp4;
2018-03-25 18:26:39 +00:00
propagatedBuildInputs = [ libev result ];
installPhase = ''
ocaml src/util/install_filter.ml
2018-09-05 16:11:47 +00:00
${dune.installPhase}
2018-03-25 18:26:39 +00:00
'';
meta = {
homepage = "https://ocsigen.org/lwt/";
description = "A cooperative threads library for OCaml";
maintainers = [ stdenv.lib.maintainers.vbgl ];
license = stdenv.lib.licenses.lgpl21;
inherit (ocaml.meta) platforms;
};
}