2012-08-25 17:24:17 +00:00
|
|
|
{stdenv, fetchurl, zlib, ncurses}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-07-04 19:24:01 +00:00
|
|
|
version = "2.2-3";
|
2012-08-25 17:24:17 +00:00
|
|
|
name = "atop-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.atoptool.nl/download/atop-${version}.tar.gz";
|
2015-07-04 19:24:01 +00:00
|
|
|
sha256 = "0p85isn6zih3xfprjym5xanqzazwqjj8x2mmwqyqpqjv6nibi1f7";
|
2012-08-25 17:24:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [zlib ncurses];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
''SCRPATH=$out/etc/atop''
|
|
|
|
''LOGPATH=/var/log/atop''
|
|
|
|
''INIPATH=$out/etc/rc.d/init.d''
|
|
|
|
''CRNPATH=$out/etc/cron.d''
|
|
|
|
''ROTPATH=$out/etc/logrotate.d''
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -e "s@/usr/@$out/@g" -i $(find . -type f )
|
|
|
|
sed -e "/mkdir.*LOGPATH/s@mkdir@echo missing dir @" -i Makefile
|
|
|
|
sed -e "/touch.*LOGPATH/s@touch@echo should have created @" -i Makefile
|
|
|
|
sed -e 's/chown/true/g' -i Makefile
|
|
|
|
sed -e '/chkconfig/d' -i Makefile
|
|
|
|
'';
|
|
|
|
|
2014-09-24 09:32:40 +00:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out"/{bin,sbin}
|
2015-07-04 19:24:01 +00:00
|
|
|
make systemdinstall $makeFlags
|
2014-09-24 09:32:40 +00:00
|
|
|
'';
|
|
|
|
|
2012-08-25 17:24:17 +00:00
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [raskin];
|
|
|
|
description = ''Console system performance monitor'';
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Atop is an ASCII full-screen performance monitor that is capable of reporting the activity of all processes (even if processes have finished during the interval), daily logging of system and process activity for long-term analysis, highlighting overloaded system resources by using colors, etc. At regular intervals, it shows system-level activity related to the CPU, memory, swap, disks and network layers, and for every active process it shows the CPU utilization, memory growth, disk utilization, priority, username, state, and exit code.
|
|
|
|
'';
|
2014-07-01 08:11:08 +00:00
|
|
|
inherit version;
|
|
|
|
downloadPage = http://atoptool.nl/downloadatop.php;
|
2012-08-25 17:24:17 +00:00
|
|
|
};
|
|
|
|
}
|