depot/third_party/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix
Default email a3bb8d7922 Project import generated by Copybara.
GitOrigin-RevId: 439b1605227b8adb1357b55ce8529d541abbe9eb
2021-08-06 00:33:18 +03:00

32 lines
936 B
Nix

{ lib, fetchzip, pkg-config, ncurses, libev, buildDunePackage, ocaml
, cppo, dune-configurator, ocplib-endian, result
, mmap, seq
, ocaml-syntax-shims
}:
let inherit (lib) optional versionAtLeast; in
buildDunePackage rec {
pname = "lwt";
version = "5.4.1";
useDune2 = true;
src = fetchzip {
url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz";
sha256 = "0cq2qy23sa1a5zk6nja3c652mp29i84yfrkcwks6i8sdqwli36jy";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ cppo dune-configurator ]
++ optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims
++ 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;
};
}