summary refs log tree commit diff
path: root/pkgs/os-specific/linux/dstat/default.nix
blob: c95532f13602dd6faa0477d13d2b1972739e9462 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.linux;
    maintainers = [ ];
  };
}