uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
42
pkgs/os-specific/linux/dstat/default.nix
Normal file
42
pkgs/os-specific/linux/dstat/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "dstat";
|
||||
format = "other";
|
||||
version = "0.7.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dstat-real";
|
||||
repo = "dstat";
|
||||
rev = "v${version}";
|
||||
sha256 = "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ six ];
|
||||
|
||||
patches = [
|
||||
./fix_pluginpath.patch
|
||||
# this fixes another bug with python3
|
||||
(fetchpatch {
|
||||
url = "https://github.com/efexgee/dstat/commit/220a785321b13b6df92a536080aca6ef1cb644ad.patch";
|
||||
sha256 = "08kcz3yxvl35m55y7g1pr73x3bjcqnv0qlswxqyq8cqxg9zd64cn";
|
||||
})
|
||||
];
|
||||
|
||||
makeFlags = [ "prefix=$(out)" ];
|
||||
|
||||
# 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";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ];
|
||||
changelog = "https://github.com/dstat-real/dstat/blob/v${version}/ChangeLog";
|
||||
};
|
||||
}
|
||||
15
pkgs/os-specific/linux/dstat/fix_pluginpath.patch
Normal file
15
pkgs/os-specific/linux/dstat/fix_pluginpath.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/dstat b/dstat
|
||||
index 3ac7087..c5f089d 100755
|
||||
--- a/dstat
|
||||
+++ b/dstat
|
||||
@@ -66,9 +66,7 @@ if sys.version_info < (2, 3):
|
||||
|
||||
pluginpath = [
|
||||
os.path.expanduser('~/.dstat/'), # home + /.dstat/
|
||||
- os.path.abspath(os.path.dirname(sys.argv[0])) + '/plugins/', # binary path + /plugins/
|
||||
- '/usr/share/dstat/',
|
||||
- '/usr/local/share/dstat/',
|
||||
+ os.path.abspath(os.path.dirname(sys.argv[0])) + '/../share/dstat/', # binary path + /../share/dstat/
|
||||
]
|
||||
|
||||
class Options:
|
||||
Loading…
Add table
Add a link
Reference in a new issue