2016-11-09 15:54:07 +01:00
|
|
|
{ stdenv, fetchurl, python2Packages }:
|
2012-08-05 14:55:44 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-06-20 18:08:31 +02:00
|
|
|
name = "dstat-${version}";
|
|
|
|
version = "0.7.3";
|
2012-08-05 14:55:44 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-06-20 18:08:31 +02:00
|
|
|
url = "https://github.com/dagwieers/dstat/archive/${version}.tar.gz";
|
|
|
|
sha256 = "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6";
|
2012-08-05 14:55:44 +02:00
|
|
|
};
|
|
|
|
|
2016-11-09 15:54:07 +01:00
|
|
|
buildInputs = with python2Packages; [ python-wifi wrapPython ];
|
2015-09-14 23:09:17 +02:00
|
|
|
|
2016-11-09 15:54:07 +01:00
|
|
|
pythonPath = with python2Packages; [ python-wifi ];
|
2012-08-05 14:55:44 +02:00
|
|
|
|
|
|
|
patchPhase = ''
|
2016-11-09 15:54:07 +01:00
|
|
|
sed -i -e 's|/usr/bin/env python|${python2Packages.python.interpreter}|' \
|
2012-08-05 14:55:44 +02:00
|
|
|
-e "s|/usr/share/dstat|$out/share/dstat|" dstat
|
|
|
|
'';
|
|
|
|
|
2015-11-26 18:44:44 +01:00
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
2012-08-05 14:55:44 +02:00
|
|
|
|
2015-09-14 23:09:17 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapPythonProgramsIn $out/bin "$out $pythonPath"
|
|
|
|
'';
|
|
|
|
|
2015-06-22 08:25:07 +02:00
|
|
|
meta = with stdenv.lib; {
|
2012-08-05 14:55:44 +02:00
|
|
|
homepage = http://dag.wieers.com/home-made/dstat/;
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Versatile resource statistics tool";
|
2015-06-22 08:25:07 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2015-09-14 23:09:17 +02:00
|
|
|
maintainers = with maintainers; [ jgeerds nckx ];
|
2012-08-05 14:55:44 +02:00
|
|
|
};
|
|
|
|
}
|