1{ stdenv, fetchurl, libev, ocaml, findlib, ocaml_lwt, ocaml_react, zed }:
2
3assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01";
4
5stdenv.mkDerivation rec {
6 version = "1.10";
7 name = "lambda-term-${version}";
8
9 src = fetchurl {
10 url = "https://github.com/diml/lambda-term/archive/${version}.tar.gz";
11 sha256 = "1kwpsqds51xmy3z3ddkam92hkl7arlzy9awhzsq62ysxcl91fb8m";
12 };
13
14 buildInputs = [ libev ocaml findlib ocaml_react ];
15
16 propagatedBuildInputs = [ zed ocaml_lwt ];
17
18 createFindlibDestdir = true;
19
20 meta = { description = "Terminal manipulation library for OCaml";
21 longDescription = ''
22 Lambda-term is a cross-platform library for
23 manipulating the terminal. It provides an abstraction for keys,
24 mouse events, colors, as well as a set of widgets to write
25 curses-like applications.
26
27 The main objective of lambda-term is to provide a higher level
28 functional interface to terminal manipulation than, for example,
29 ncurses, by providing a native OCaml interface instead of bindings to
30 a C library.
31
32 Lambda-term integrates with zed to provide text edition facilities in
33 console applications.
34 '';
35
36 homepage = https://github.com/diml/lambda-term;
37 license = stdenv.lib.licenses.bsd3;
38 platforms = ocaml.meta.platforms or [];
39 maintainers = [
40 stdenv.lib.maintainers.gal_bolle
41 ];
42 };
43}