lol
1{ lib, stdenv, fetchFromGitHub, ncurses, uthash, pkg-config }:
2
3stdenv.mkDerivation rec {
4 pname = "logtop";
5 version = "0.7";
6
7 src = fetchFromGitHub {
8 rev = "logtop-${version}";
9 owner = "JulienPalard";
10 repo ="logtop";
11 sha256 = "1f8vk9gybldxvc0kwz38jxmwvzwangsvlfslpsx8zf04nvbkqi12";
12 };
13
14 nativeBuildInputs = [ pkg-config ];
15 buildInputs = [ ncurses uthash ];
16
17 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
18 installFlags = [ "DESTDIR=$(out)" ];
19
20 postConfigure = ''
21 substituteInPlace Makefile --replace /usr ""
22 '';
23
24 meta = with lib; {
25 description = "Displays a real-time count of strings received from stdin";
26 longDescription = ''
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
30 '';
31 license = licenses.bsd2;
32 homepage = "https://github.com/JulienPalard/logtop";
33 platforms = platforms.unix;
34 maintainers = [ maintainers.starcraft66 ];
35 mainProgram = "logtop";
36 };
37}