2021-12-19 01:06:50 +00:00
|
|
|
{ lib, fetchFromGitHub, pkg-config, ncurses, libev, buildDunePackage, ocaml
|
2021-08-05 21:33:18 +00:00
|
|
|
, cppo, dune-configurator, 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
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocsigen";
|
|
|
|
repo = "lwt";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-XpoRKcdNo2j05Gxm5wmKSdwqimFDSWvmLyooPYTHAjM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config cppo ]
|
|
|
|
++ optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims;
|
|
|
|
buildInputs = [ dune-configurator ]
|
|
|
|
++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|