nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, fetchFromGitHub, buildDunePackage, ocaml, zed, lwt_log, lwt_react, mew_vi }:
2
3let params =
4 if lib.versionAtLeast ocaml.version "4.08" then {
5 version = "3.2.0";
6 sha256 = "sha256:048k26644wq5wlwk0j179dxrxyz9nxqqq4vvhyh6pqpgxdajd44i";
7 } else {
8 version = "3.1.0";
9 sha256 = "1k0ykiz0vhpyyj9fkss29ajas4fh1xh449j702xkvayqipzj1mkg";
10 }
11; in
12
13buildDunePackage rec {
14 pname = "lambda-term";
15 inherit (params) version;
16
17 useDune2 = true;
18
19 src = fetchFromGitHub {
20 owner = "ocaml-community";
21 repo = pname;
22 rev = version;
23 inherit (params) sha256;
24 };
25
26 propagatedBuildInputs = [ zed lwt_log lwt_react mew_vi ];
27
28 meta = {
29 description = "Terminal manipulation library for OCaml";
30 longDescription = ''
31 Lambda-term is a cross-platform library for
32 manipulating the terminal. It provides an abstraction for keys,
33 mouse events, colors, as well as a set of widgets to write
34 curses-like applications.
35
36 The main objective of lambda-term is to provide a higher level
37 functional interface to terminal manipulation than, for example,
38 ncurses, by providing a native OCaml interface instead of bindings to
39 a C library.
40
41 Lambda-term integrates with zed to provide text edition facilities in
42 console applications.
43 '';
44
45 inherit (src.meta) homepage;
46 license = lib.licenses.bsd3;
47 maintainers = [ lib.maintainers.gal_bolle ];
48 mainProgram = "lambda-term-actions";
49 };
50}