From a931de00b362477df1770b75f49e3ee8df4398fc Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 28 Jan 2015 11:09:23 +0100 Subject: [PATCH] lambda-term: update from 1.6 to 1.8 --- .../ocaml-modules/lambda-term/1.6.nix | 42 +++++++++++++++++++ .../ocaml-modules/lambda-term/default.nix | 12 +++--- pkgs/top-level/all-packages.nix | 6 ++- 3 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/ocaml-modules/lambda-term/1.6.nix diff --git a/pkgs/development/ocaml-modules/lambda-term/1.6.nix b/pkgs/development/ocaml-modules/lambda-term/1.6.nix new file mode 100644 index 00000000000..9f4b17f9b61 --- /dev/null +++ b/pkgs/development/ocaml-modules/lambda-term/1.6.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, libev, ocaml, findlib, ocaml_lwt, ocaml_react, zed, camlp4 }: + +stdenv.mkDerivation rec { + version = "1.6"; + name = "lambda-term-${version}"; + + src = fetchurl { + url = https://github.com/diml/lambda-term/archive/1.6.tar.gz; + sha256 = "1rhfixdgpylxznf6sa9wr31wb4pjzpfn5mxhxqpbchmpl2afwa09"; + }; + + buildInputs = [ libev ocaml findlib ocaml_lwt ocaml_react ]; + + propagatedBuildInputs = [ camlp4 zed ]; + + createFindlibDestdir = true; + + meta = { description = "Terminal manipulation library for OCaml"; + longDescription = '' + Lambda-term is a cross-platform library for + manipulating the terminal. It provides an abstraction for keys, + mouse events, colors, as well as a set of widgets to write + curses-like applications. + + The main objective of lambda-term is to provide a higher level + functional interface to terminal manipulation than, for example, + ncurses, by providing a native OCaml interface instead of bindings to + a C library. + + Lambda-term integrates with zed to provide text edition facilities in + console applications. + ''; + + homepage = https://github.com/diml/lambda-term; + license = stdenv.lib.licenses.bsd3; + platforms = ocaml.meta.platforms; + branch = "1.6"; + maintainers = [ + stdenv.lib.maintainers.gal_bolle + ]; + }; +} diff --git a/pkgs/development/ocaml-modules/lambda-term/default.nix b/pkgs/development/ocaml-modules/lambda-term/default.nix index 1baea569dbd..0186ab055f5 100644 --- a/pkgs/development/ocaml-modules/lambda-term/default.nix +++ b/pkgs/development/ocaml-modules/lambda-term/default.nix @@ -1,17 +1,19 @@ { stdenv, fetchurl, libev, ocaml, findlib, ocaml_lwt, ocaml_react, zed, camlp4 }: +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"; + stdenv.mkDerivation rec { - version = "1.6"; + version = "1.8"; name = "lambda-term-${version}"; src = fetchurl { - url = https://github.com/diml/lambda-term/archive/1.6.tar.gz; - sha256 = "1rhfixdgpylxznf6sa9wr31wb4pjzpfn5mxhxqpbchmpl2afwa09"; + url = https://github.com/diml/lambda-term/archive/1.8.tar.gz; + sha256 = "0hy11x48q5bbh9czjp0w756cyxzr2c6qcnfm5n9f0i1l4qljwpgc"; }; - buildInputs = [ libev ocaml findlib ocaml_lwt ocaml_react ]; + buildInputs = [ libev ocaml findlib ocaml_react ]; - propagatedBuildInputs = [ camlp4 zed ]; + propagatedBuildInputs = [ camlp4 zed ocaml_lwt ]; createFindlibDestdir = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fc477c61eb8..d768d3dea0f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3822,7 +3822,11 @@ let gtkmathview = callPackage ../development/libraries/gtkmathview { }; }; - lambdaTerm = callPackage ../development/ocaml-modules/lambda-term { }; + lambdaTerm-1_6 = callPackage ../development/ocaml-modules/lambda-term/1.6.nix { }; + lambdaTerm = + if lib.versionOlder "4.01" ocaml_version + then callPackage ../development/ocaml-modules/lambda-term { } + else lambdaTerm-1_6; macaque = callPackage ../development/ocaml-modules/macaque { };