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