about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2016-11-21 13:13:51 +0100
committerGitHub <noreply@github.com>2016-11-21 13:13:51 +0100
commitc346326b24319f8f614423b222a37ddc81162d91 (patch)
tree5e4c0a3dceb23d7235e0c6a127b488af4d625526
parent9c1b6709a9aaea492214cdab75f7431ce797b540 (diff)
parent15004268d7af5deecb59424a991995ac4bd70b22 (diff)
downloadnixlib-c346326b24319f8f614423b222a37ddc81162d91.tar
nixlib-c346326b24319f8f614423b222a37ddc81162d91.tar.gz
nixlib-c346326b24319f8f614423b222a37ddc81162d91.tar.bz2
nixlib-c346326b24319f8f614423b222a37ddc81162d91.tar.lz
nixlib-c346326b24319f8f614423b222a37ddc81162d91.tar.xz
nixlib-c346326b24319f8f614423b222a37ddc81162d91.tar.zst
nixlib-c346326b24319f8f614423b222a37ddc81162d91.zip
Merge pull request #20527 from sternenseemann/notty
ocaml-notty: init at 0.1.1
-rw-r--r--pkgs/development/ocaml-modules/notty/default.nix37
-rw-r--r--pkgs/top-level/ocaml-packages.nix4
2 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix
new file mode 100644
index 000000000000..3178789c3993
--- /dev/null
+++ b/pkgs/development/ocaml-modules/notty/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, buildOcaml, fetchFromGitHub, findlib
+, result, uucp, uuseg, uutf
+, lwt     ? null }:
+
+with stdenv.lib;
+
+let withLwt = lwt != null; in
+
+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" ] ++
+                   (if withLwt then ["--enable-lwt"] else ["--disable-lwt"]);
+
+  configurePhase = "./configure --prefix $out $configureFlags";
+
+  meta = {
+    inherit (src.meta) homepage;
+    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 ce744985460f..ba006319261d 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -265,6 +265,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 { };