2015-09-14 21:09:17 +00:00
|
|
|
{ stdenv, fetchurl, python, pythonPackages }:
|
2012-08-05 12:55:44 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dstat-0.7.2";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dag.wieers.com/home-made/dstat/${name}.tar.bz2";
|
|
|
|
sha256 = "1bivnciwlamnl9q6i5ygr7jhs8pp833z2bkbrffvsa60szcqda9l";
|
|
|
|
};
|
|
|
|
|
2015-09-14 21:09:17 +00:00
|
|
|
buildInputs = with pythonPackages; [ python-wifi wrapPython ];
|
|
|
|
|
|
|
|
pythonPath = with pythonPackages; [ python-wifi ];
|
2012-08-05 12:55:44 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e 's|/usr/bin/env python|${python}/bin/python|' \
|
|
|
|
-e "s|/usr/share/dstat|$out/share/dstat|" dstat
|
|
|
|
'';
|
|
|
|
|
2015-11-26 17:44:44 +00:00
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
2012-08-05 12:55:44 +00:00
|
|
|
|
2015-09-14 21:09:17 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapPythonProgramsIn $out/bin "$out $pythonPath"
|
|
|
|
'';
|
|
|
|
|
2015-06-22 06:25:07 +00:00
|
|
|
meta = with stdenv.lib; {
|
2012-08-05 12:55:44 +00:00
|
|
|
homepage = http://dag.wieers.com/home-made/dstat/;
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Versatile resource statistics tool";
|
2015-06-22 06:25:07 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2015-09-14 21:09:17 +00:00
|
|
|
maintainers = with maintainers; [ jgeerds nckx ];
|
2012-08-05 12:55:44 +00:00
|
|
|
};
|
|
|
|
}
|