2020-12-16 16:11:27 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
|
2012-08-05 13:55:44 +01:00
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "dstat";
|
2017-03-21 12:01:17 +00:00
|
|
|
format = "other";
|
2020-12-16 16:11:27 +00:00
|
|
|
version = "0.7.4";
|
2012-08-05 13:55:44 +01:00
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dstat-real";
|
|
|
|
repo = "dstat";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v";
|
2012-08-05 13:55:44 +01:00
|
|
|
};
|
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [ six ];
|
2012-08-05 13:55:44 +01:00
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
patches = [
|
|
|
|
./fix_pluginpath.patch
|
|
|
|
# this fixes another bug with python3
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/efexgee/dstat/commit/220a785321b13b6df92a536080aca6ef1cb644ad.patch ;
|
|
|
|
sha256 = "08kcz3yxvl35m55y7g1pr73x3bjcqnv0qlswxqyq8cqxg9zd64cn";
|
|
|
|
})
|
|
|
|
];
|
2020-02-15 00:41:39 +00:00
|
|
|
|
2015-11-26 17:44:44 +00:00
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
2012-08-05 13:55:44 +01:00
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
# remove deprecation warnings
|
|
|
|
preFixup = ''
|
|
|
|
sed -i "s/import collections/import collections.abc/g" $out/share/dstat/dstat.py $out/bin/dstat
|
|
|
|
sed -i "s/collections.Sequence/collections.abc.Sequence/g" "$out"/bin/dstat
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://dag.wieers.com/home-made/dstat/";
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Versatile resource statistics tool";
|
2015-06-22 07:25:07 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2019-03-12 22:45:33 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2012-08-05 13:55:44 +01:00
|
|
|
};
|
|
|
|
}
|