2012-08-25 18:24:17 +01:00
|
|
|
{stdenv, fetchurl, zlib, ncurses}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "atop";
|
2020-12-27 21:55:50 +00:00
|
|
|
version = "2.6.0";
|
2012-08-25 18:24:17 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://www.atoptool.nl/download/atop-${version}.tar.gz";
|
2020-12-27 21:55:50 +00:00
|
|
|
sha256 = "nsLKOlcWkvfvqglfmaUQZDK8txzCLNbElZfvBIEFj3I=";
|
2012-08-25 18:24:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [zlib ncurses];
|
|
|
|
|
|
|
|
makeFlags = [
|
2020-12-27 21:55:50 +00:00
|
|
|
"SCRPATH=$out/etc/atop"
|
|
|
|
"LOGPATH=/var/log/atop"
|
|
|
|
"INIPATH=$out/etc/rc.d/init.d"
|
|
|
|
"SYSDPATH=$out/lib/systemd/system"
|
|
|
|
"CRNPATH=$out/etc/cron.d"
|
|
|
|
"DEFPATH=$out/etc/default"
|
|
|
|
"ROTPATH=$out/etc/logrotate.d"
|
2012-08-25 18:24:17 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
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
|
2017-07-03 19:24:33 +01:00
|
|
|
sed -e 's/chmod 04711/chmod 0711/g' -i Makefile
|
2012-08-25 18:24:17 +01:00
|
|
|
'';
|
|
|
|
|
2020-12-27 21:55:50 +00:00
|
|
|
installTargets = [ "systemdinstall" ];
|
2014-09-24 10:32:40 +01:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out"/{bin,sbin}
|
|
|
|
'';
|
|
|
|
|
2018-08-16 20:21:58 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
2012-08-25 18:24:17 +01:00
|
|
|
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 09:11:08 +01:00
|
|
|
inherit version;
|
2020-12-27 21:55:50 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-01 02:11:51 +01:00
|
|
|
downloadPage = "http://atoptool.nl/downloadatop.php";
|
2012-08-25 18:24:17 +01:00
|
|
|
};
|
|
|
|
}
|