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