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
|
|
|
}:
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
let inherit (lib) optional versionOlder; in
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "lwt";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "5.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocsigen";
|
|
|
|
repo = "lwt";
|
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256:1jbjz2rsz3j56k8vh5qlmm87hhkr250bs2m3dvpy9vsri8rkzj9z";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config cppo ]
|
2022-04-27 09:35:20 +00:00
|
|
|
++ optional (versionOlder ocaml.version "4.08") ocaml-syntax-shims;
|
2022-03-05 16:20:37 +00:00
|
|
|
buildInputs = [ dune-configurator ]
|
2022-04-27 09:35:20 +00:00
|
|
|
++ optional (versionOlder 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;
|
|
|
|
};
|
|
|
|
}
|