2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ncurses, uthash, pkg-config }:
|
2020-10-06 07:34:14 +00:00
|
|
|
|
2021-08-02 09:38:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "logtop";
|
|
|
|
version = "0.7";
|
2020-10-06 07:34:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-02 09:38:45 +00:00
|
|
|
rev = "logtop-${version}";
|
2020-10-06 07:34:14 +00:00
|
|
|
owner = "JulienPalard";
|
|
|
|
repo ="logtop";
|
|
|
|
sha256 = "1f8vk9gybldxvc0kwz38jxmwvzwangsvlfslpsx8zf04nvbkqi12";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ ncurses uthash ];
|
|
|
|
|
2021-05-17 19:05:00 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
2020-10-06 07:34:14 +00:00
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace Makefile --replace /usr ""
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Displays a real-time count of strings received from stdin";
|
2020-10-06 07:34:14 +00:00
|
|
|
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 ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "logtop";
|
2020-10-06 07:34:14 +00:00
|
|
|
};
|
|
|
|
}
|