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

36 lines
1.0 KiB
Nix
Raw Normal View History

2018-09-05 17:11:47 +01:00
{ stdenv, fetchzip, pkgconfig, ncurses, libev, dune
, ocaml, findlib, cppo
2018-03-25 19:26:39 +01:00
, ocaml-migrate-parsetree, ppx_tools_versioned, result
2016-11-21 18:20:43 +00:00
}:
let inherit (stdenv.lib) optional versionAtLeast; in
2018-03-25 19:26:39 +01:00
stdenv.mkDerivation rec {
version = "4.1.0";
2018-03-25 19:26:39 +01:00
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";
sha256 = "16wnc61kfj54z4q8sn9f5iik37pswz328hcz3z6rkza3kh3s6wmm";
};
2018-03-25 19:26:39 +01:00
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ocaml findlib dune cppo
ocaml-migrate-parsetree ppx_tools_versioned
] ++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
2018-03-25 19:26:39 +01:00
propagatedBuildInputs = [ libev result ];
configurePhase = "ocaml src/util/configure.ml -use-libev true";
buildPhase = "jbuilder build -p lwt";
inherit (dune) installPhase;
2018-03-25 19:26:39 +01: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;
};
}