2020-12-16 16:11:27 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
|
2012-08-05 12:55:44 +00:00
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-08-31 11:41:23 +00: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 12:55:44 +00:00
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dstat-real";
|
|
|
|
repo = "dstat";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v";
|
2012-08-05 12:55:44 +00:00
|
|
|
};
|
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [ six ];
|
2012-08-05 12:55:44 +00:00
|
|
|
|
2020-12-16 16:11:27 +00:00
|
|
|
patches = [
|
|
|
|
./fix_pluginpath.patch
|
|
|
|
# this fixes another bug with python3
|
|
|
|
(fetchpatch {
|
2021-06-20 14:26:23 +00:00
|
|
|
url = "https://github.com/efexgee/dstat/commit/220a785321b13b6df92a536080aca6ef1cb644ad.patch";
|
2020-12-16 16:11:27 +00:00
|
|
|
sha256 = "08kcz3yxvl35m55y7g1pr73x3bjcqnv0qlswxqyq8cqxg9zd64cn";
|
|
|
|
})
|
|
|
|
];
|
2020-02-15 00:41:39 +00:00
|
|
|
|
2015-11-26 17:44:44 +00:00
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
2012-08-05 12:55:44 +00: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 01:11:51 +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;
|
2019-03-12 22:45:33 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-02-09 00:58:24 +00:00
|
|
|
changelog = "https://github.com/dstat-real/dstat/blob/v${version}/ChangeLog";
|
2012-08-05 12:55:44 +00:00
|
|
|
};
|
|
|
|
}
|