From 02388e9ba55972f8af428a65d8eb9684ec586dde Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 3 Nov 2016 03:06:14 +0100 Subject: [PATCH] ocaml-notty: init at 0.1.1 --- .../ocaml-modules/notty/default.nix | 36 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 +++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/ocaml-modules/notty/default.nix diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix new file mode 100644 index 000000000000..431004b41b40 --- /dev/null +++ b/pkgs/development/ocaml-modules/notty/default.nix @@ -0,0 +1,36 @@ +{ stdenv, buildOcaml, fetchFromGitHub, findlib +, result, uucp, uuseg, uutf +, withLwt ? true +, lwt ? null }: + +with stdenv.lib; +assert withLwt -> lwt != null; + +buildOcaml rec { + version = "0.1.1"; + name = "notty"; + + minimumSupportedOcamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "pqwy"; + repo = "notty"; + rev = "v${version}"; + sha256 = "0bw3bq8z2y1rhc20zn13s78sazywyzpg8nmyjch33p7ypxfglf01"; + }; + + buildInputs = [ findlib ]; + propagatedBuildInputs = [ result uucp uuseg uutf ] ++ + optional withLwt lwt; + + configureFlags = [ "--enable-unix" ] ++ + optional withLwt ["--enable-lwt"]; + configurePhase = "./configure --prefix $out $configureFlags"; + + meta = with stdenv.lib; { + homepage = https://github.com/pqwy/notty/tree/master; + description = "Declarative terminal graphics for OCaml."; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d86bce068362..55a5cd7c8cf3 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -263,6 +263,10 @@ let lwt = ocaml_lwt; }; + notty = callPackage ../development/ocaml-modules/notty { + lwt = ocaml_lwt; + }; + ocaml_batteries = callPackage ../development/ocaml-modules/batteries { }; comparelib = callPackage ../development/ocaml-modules/comparelib { };