nixpkgs/pkgs/os-specific/linux/dstat/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
2012-08-05 12:55:44 +00:00
python3Packages.buildPythonApplication rec {
2019-08-31 11:41:23 +00:00
pname = "dstat";
format = "other";
version = "0.7.4";
2012-08-05 12:55:44 +00:00
src = fetchFromGitHub {
owner = "dstat-real";
repo = "dstat";
rev = "v${version}";
sha256 = "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v";
2012-08-05 12:55:44 +00:00
};
propagatedBuildInputs = with python3Packages; [ six ];
2012-08-05 12:55:44 +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
makeFlags = [ "prefix=$(out)" ];
2012-08-05 12:55:44 +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
'';
meta = with lib; {
homepage = "http://dag.wieers.com/home-made/dstat/";
description = "Versatile resource statistics tool";
2015-06-22 06:25:07 +00:00
license = licenses.gpl2;
platforms = platforms.linux;
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
};
}