about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/atop
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/os-specific/linux/atop
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/atop')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/atop/default.nix48
-rw-r--r--nixpkgs/pkgs/os-specific/linux/atop/default.upstream4
2 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/atop/default.nix b/nixpkgs/pkgs/os-specific/linux/atop/default.nix
new file mode 100644
index 000000000000..739342b77fda
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/atop/default.nix
@@ -0,0 +1,48 @@
+{stdenv, fetchurl, zlib, ncurses}:
+
+stdenv.mkDerivation rec {
+  version = "2.3.0";
+  name = "atop-${version}";
+
+  src = fetchurl {
+    url = "https://www.atoptool.nl/download/atop-${version}.tar.gz";
+    sha256 = "0r5j9q89wpylmg0px5xymxi3jpihw9wq8bh37g3ciymsw1fp5r3k";
+  };
+
+  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
+    sed -e 's/chmod 04711/chmod 0711/g' -i Makefile
+  '';
+
+  preInstall = ''
+    mkdir -p "$out"/{bin,sbin}
+    make systemdinstall $makeFlags
+  '';
+
+  meta = with stdenv.lib; {
+    platforms = platforms.linux;
+    maintainers = with 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.
+    '';
+    inherit version;
+    license = licenses.gpl2;
+    downloadPage = http://atoptool.nl/downloadatop.php;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/atop/default.upstream b/nixpkgs/pkgs/os-specific/linux/atop/default.upstream
new file mode 100644
index 000000000000..46099d9c9595
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/atop/default.upstream
@@ -0,0 +1,4 @@
+url http://atoptool.nl/downloadatop.php
+version_link '[.]tar[.]'
+version '[^0-9]*[-.]([0-9]([-0-9.]*[0-9])?)[.].*' '\1'
+minimize_overwrite