summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/os-specific/linux/dstat/default.nix27
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/dstat/default.nix b/pkgs/os-specific/linux/dstat/default.nix
new file mode 100644
index 00000000000..fb454c78788
--- /dev/null
+++ b/pkgs/os-specific/linux/dstat/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, python }:
+
+stdenv.mkDerivation rec {
+  name = "dstat-0.7.2";
+
+  src = fetchurl {
+    url = "http://dag.wieers.com/home-made/dstat/${name}.tar.bz2";
+    sha256 = "1bivnciwlamnl9q6i5ygr7jhs8pp833z2bkbrffvsa60szcqda9l";
+  };
+
+  buildInputs = [ ];
+
+  patchPhase = ''
+    sed -i -e 's|/usr/bin/env python|${python}/bin/python|' \
+           -e "s|/usr/share/dstat|$out/share/dstat|" dstat
+  '';
+
+  makeFlags = "prefix=$(out)";
+
+  meta = {
+    homepage = http://dag.wieers.com/home-made/dstat/;
+    description = "Versatile resource statistics tool.";
+    license = "GPLv2";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a0cf5f4739a..7348082740e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5494,6 +5494,8 @@ let
 
   drbd = callPackage ../os-specific/linux/drbd { };
 
+  dstat = callPackage ../os-specific/linux/dstat { };
+
   libuuid =
     if crossSystem != null && crossSystem.config == "i586-pc-gnu"
     then (utillinux // {