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