1 { lib, fetchFromGitHub, buildDunePackage, ocaml, zed, lwt_log, lwt_react, mew_vi, uucp, logs }:
4 if lib.versionAtLeast ocaml.version "4.08" then {
6 sha256 = "sha256-C124bhdrY+XzL93zzNEbCr+U+7CYBZDm0hlAw+iqat4=";
9 sha256 = "1k0ykiz0vhpyyj9fkss29ajas4fh1xh449j702xkvayqipzj1mkg";
13 buildDunePackage rec {
14 pname = "lambda-term";
15 inherit (params) version;
17 duneVersion = if lib.versionAtLeast ocaml.version "4.08" then "3" else "2";
19 src = fetchFromGitHub {
20 owner = "ocaml-community";
23 inherit (params) sha256;
26 propagatedBuildInputs = [ zed lwt_log lwt_react mew_vi ]
27 ++ lib.optionals (lib.versionAtLeast version "3.3.1") [ uucp logs ] ;
30 description = "Terminal manipulation library for OCaml";
32 Lambda-term is a cross-platform library for
33 manipulating the terminal. It provides an abstraction for keys,
34 mouse events, colors, as well as a set of widgets to write
35 curses-like applications.
37 The main objective of lambda-term is to provide a higher level
38 functional interface to terminal manipulation than, for example,
39 ncurses, by providing a native OCaml interface instead of bindings to
42 Lambda-term integrates with zed to provide text edition facilities in
46 inherit (src.meta) homepage;
47 license = lib.licenses.bsd3;
48 maintainers = [ lib.maintainers.gal_bolle ];
49 mainProgram = "lambda-term-actions";