2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchzip, pkg-config, ncurses, libev, buildDunePackage, ocaml
|
2021-02-13 14:23:35 +00:00
|
|
|
, cppo, dune-configurator, ocaml-migrate-parsetree, ocplib-endian, result
|
2020-04-24 23:36:52 +00:00
|
|
|
, mmap, seq
|
2021-02-13 14:23:35 +00:00
|
|
|
, ocaml-syntax-shims
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let inherit (lib) optional versionAtLeast; in
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "lwt";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "5.4.1";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
useDune2 = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "0cq2qy23sa1a5zk6nja3c652mp29i84yfrkcwks6i8sdqwli36jy";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-02-13 14:23:35 +00:00
|
|
|
buildInputs = [ cppo dune-configurator ocaml-migrate-parsetree ]
|
|
|
|
++ optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims
|
2020-04-24 23:36:52 +00:00
|
|
|
++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
|
|
|
|
propagatedBuildInputs = [ libev mmap ocplib-endian seq result ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://ocsigen.org/lwt/";
|
|
|
|
description = "A cooperative threads library for OCaml";
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|