1 { lib, stdenv, fetchFromGitHub, ncurses, uthash, pkg-config }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 rev = "logtop-${version}";
9 owner = "JulienPalard";
11 sha256 = "1f8vk9gybldxvc0kwz38jxmwvzwangsvlfslpsx8zf04nvbkqi12";
14 nativeBuildInputs = [ pkg-config ];
15 buildInputs = [ ncurses uthash ];
17 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
18 installFlags = [ "DESTDIR=$(out)" ];
21 substituteInPlace Makefile --replace /usr ""
25 description = "Displays a real-time count of strings received from stdin";
27 logtop displays a real-time count of strings received from stdin.
28 It can be useful in some cases, like getting the IP flooding your
29 server or the top buzzing article of your blog
31 license = licenses.bsd2;
32 homepage = "https://github.com/JulienPalard/logtop";
33 platforms = platforms.unix;
34 maintainers = [ maintainers.starcraft66 ];
35 mainProgram = "logtop";