about summary refs log tree commit diff
path: root/pkgs/tools/misc/logtop
diff options
context:
space:
mode:
authorTristan <starcraft66@gmail.com>2020-10-06 03:34:14 -0400
committerGitHub <noreply@github.com>2020-10-06 09:34:14 +0200
commit6df7db0b426f7859335a8c2be39dd7a8ba3eadf5 (patch)
treea8e07efa3992879391088a310af16ed55f9af8cb /pkgs/tools/misc/logtop
parent3696bc0e893387a9e0c34c8570204d064aab774b (diff)
logtop: init at 0.7 (#99593)
* maintainers: add starcraft66

* logtop: init at 0.7
Diffstat (limited to 'pkgs/tools/misc/logtop')
-rw-r--r--pkgs/tools/misc/logtop/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/misc/logtop/default.nix b/pkgs/tools/misc/logtop/default.nix
new file mode 100644
index 0000000000000..76c287fe391c5
--- /dev/null
+++ b/pkgs/tools/misc/logtop/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, ncurses, uthash, pkg-config }:
+
+stdenv.mkDerivation {
+  name = "logtop-0.7";
+
+  src = fetchFromGitHub {
+    rev = "a0935ab2e7056feb3e8a90f5129990c9b335a587";
+    owner = "JulienPalard";
+    repo  ="logtop";
+    sha256 = "1f8vk9gybldxvc0kwz38jxmwvzwangsvlfslpsx8zf04nvbkqi12";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ ncurses uthash ];
+
+  installFlags = [ "DESTDIR=$(out)" ];
+
+  postConfigure = ''
+    substituteInPlace Makefile --replace /usr ""
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Displays a real-time count of strings received from stdin.";
+    longDescription = ''
+      logtop displays a real-time count of strings received from stdin.
+      It can be useful in some cases, like getting the IP flooding your
+      server or the top buzzing article of your blog
+    '';
+    license = licenses.bsd2;
+    homepage = "https://github.com/JulienPalard/logtop";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.starcraft66 ];
+  };
+}