nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, fetchzip, pkg-config, ncurses, libev, buildDunePackage, ocaml
2, cppo, dune-configurator, ocplib-endian, result
3, mmap, seq
4, ocaml-syntax-shims
5}:
6
7let inherit (lib) optional versionAtLeast; in
8
9buildDunePackage rec {
10 pname = "lwt";
11 version = "5.4.1";
12
13 useDune2 = true;
14
15 src = fetchzip {
16 url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz";
17 sha256 = "0cq2qy23sa1a5zk6nja3c652mp29i84yfrkcwks6i8sdqwli36jy";
18 };
19
20 nativeBuildInputs = [ pkg-config cppo dune-configurator ];
21 buildInputs = optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims
22 ++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
23 propagatedBuildInputs = [ libev mmap ocplib-endian seq result ];
24
25 meta = {
26 homepage = "https://ocsigen.org/lwt/";
27 description = "A cooperative threads library for OCaml";
28 maintainers = [ lib.maintainers.vbgl ];
29 license = lib.licenses.mit;
30 };
31}