13 # makes the package unfree via pynvml
17 stdenv.mkDerivation rec {
22 url = "https://www.atoptool.nl/download/atop-${version}.tar.gz";
23 hash = "sha256-m5TGZmAu//e/QC7M5wbDR/OMOctjSY+dOWJoYeVkbiA=";
30 ++ lib.optionals withAtopgpu [
31 python3.pkgs.wrapPython
40 ++ lib.optionals withAtopgpu [
44 pythonPath = lib.optionals withAtopgpu [
52 "MAN1PATH=/share/man/man1"
53 "MAN5PATH=/share/man/man5"
54 "MAN8PATH=/share/man/man8"
55 "SYSDPATH=/lib/systemd/system"
56 "PMPATHD=/lib/systemd/system-sleep"
60 # Fix paths in atop.service, atop-rotate.service, atopgpu.service, atopacct.service,
63 # Don't fail on missing /etc/default/atop, make sure /var/log/atop exists pre-start
68 for f in *.{sh,service}; do
69 findutils=${findutils} systemd=${systemd} substituteAllInPlace "$f"
72 substituteInPlace Makefile --replace 'chown' 'true'
73 substituteInPlace Makefile --replace 'chmod 04711' 'chmod 0711'
82 # Remove extra files we don't need
83 rm -r $out/{var,etc} $out/bin/atop{sar,}-${version}
92 rm $out/lib/systemd/system/atopgpu.service $out/bin/atopgpud $out/share/man/man8/atopgpud.8
96 passthru.tests = { inherit (nixosTests) atop; };
99 platforms = platforms.linux;
100 maintainers = with maintainers; [ raskin ];
101 description = "Console system performance monitor";
103 Atop is an ASCII full-screen performance monitor that is capable of reporting the activity of
104 all processes (even if processes have finished during the interval), daily logging of system
105 and process activity for long-term analysis, highlighting overloaded system resources by using
106 colors, etc. At regular intervals, it shows system-level activity related to the CPU, memory,
107 swap, disks and network layers, and for every active process it shows the CPU utilization,
108 memory growth, disk utilization, priority, username, state, and exit code.
110 license = licenses.gpl2Plus;
111 downloadPage = "http://atoptool.nl/downloadatop.php";