summary refs log tree commit diff
path: root/pkgs/os-specific/linux/iotop-c
diff options
context:
space:
mode:
authorAlexander Rezvov <rezvov@majordomo.ru>2021-06-12 21:51:26 +0300
committerAlexander Rezvov <rezvov@majordomo.ru>2021-06-16 03:15:08 +0300
commit74f03b7e7cd20f3ada7a6d13520017884dd609cd (patch)
tree7a075cb2f0234647c87d5908f0c977ae7f6605b2 /pkgs/os-specific/linux/iotop-c
parent06cc4174d918255a351aa52063d7a03be289124e (diff)
downloadnixpkgs-74f03b7e7cd20f3ada7a6d13520017884dd609cd.tar
nixpkgs-74f03b7e7cd20f3ada7a6d13520017884dd609cd.tar.gz
nixpkgs-74f03b7e7cd20f3ada7a6d13520017884dd609cd.tar.bz2
nixpkgs-74f03b7e7cd20f3ada7a6d13520017884dd609cd.tar.lz
nixpkgs-74f03b7e7cd20f3ada7a6d13520017884dd609cd.tar.xz
nixpkgs-74f03b7e7cd20f3ada7a6d13520017884dd609cd.tar.zst
nixpkgs-74f03b7e7cd20f3ada7a6d13520017884dd609cd.zip
iotop-c: add new package
Diffstat (limited to 'pkgs/os-specific/linux/iotop-c')
-rw-r--r--pkgs/os-specific/linux/iotop-c/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/iotop-c/default.nix b/pkgs/os-specific/linux/iotop-c/default.nix
new file mode 100644
index 00000000000..0d03f2024b4
--- /dev/null
+++ b/pkgs/os-specific/linux/iotop-c/default.nix
@@ -0,0 +1,30 @@
+{stdenv, fetchFromGitHub, lib, ncurses, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "iotop-c";
+  version = "1.17";
+
+  src = fetchFromGitHub {
+    owner = "Tomas-M";
+    repo = "iotop";
+    rev = "v${version}";
+    sha256 = "0hjy30155c3nijx3jgyn5kpj293632p0j6f3lf5acdfax1ynav86";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ ncurses ];
+  makeFlags = [ "DESTDIR=$(out)" "TARGET=iotop-c" ];
+
+  postInstall = ''
+    mv $out/usr/share/man/man8/{iotop,iotop-c}.8
+    ln -s $out/usr/sbin $out/bin
+    ln -s $out/usr/share $out/share
+  '';
+
+  meta = with lib; {
+    description = "iotop identifies processes that use high amount of input/output requests on your machine";
+    homepage = "https://github.com/Tomas-M/iotop";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}