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