diff options
author | Julien Moutinho <julm+nix@sourcephile.fr> | 2020-02-15 01:41:39 +0100 |
---|---|---|
committer | Julien Moutinho <julm+nix@sourcephile.fr> | 2020-02-15 01:48:48 +0100 |
commit | 7b9129a98146cff91360419541955f55c5a09aec (patch) | |
tree | 0ce2010e656c1087d3e8e759f44777f9f1db5cb2 /pkgs | |
parent | 047c2bfc112e0a0e9e48cad77ac1ea9ddf3db344 (diff) | |
download | nixpkgs-7b9129a98146cff91360419541955f55c5a09aec.tar nixpkgs-7b9129a98146cff91360419541955f55c5a09aec.tar.gz nixpkgs-7b9129a98146cff91360419541955f55c5a09aec.tar.bz2 nixpkgs-7b9129a98146cff91360419541955f55c5a09aec.tar.lz nixpkgs-7b9129a98146cff91360419541955f55c5a09aec.tar.xz nixpkgs-7b9129a98146cff91360419541955f55c5a09aec.tar.zst nixpkgs-7b9129a98146cff91360419541955f55c5a09aec.zip |
dstat: fix pluginpath
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/os-specific/linux/dstat/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/dstat/fix_pluginpath.patch | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/dstat/default.nix b/pkgs/os-specific/linux/dstat/default.nix index 25d0eb1fd02..0e4725b6f19 100644 --- a/pkgs/os-specific/linux/dstat/default.nix +++ b/pkgs/os-specific/linux/dstat/default.nix @@ -12,6 +12,8 @@ python2Packages.buildPythonApplication rec { propagatedBuildInputs = with python2Packages; [ python-wifi ]; + patches = [ ./fix_pluginpath.patch ]; + makeFlags = [ "prefix=$(out)" ]; meta = with stdenv.lib; { diff --git a/pkgs/os-specific/linux/dstat/fix_pluginpath.patch b/pkgs/os-specific/linux/dstat/fix_pluginpath.patch new file mode 100644 index 00000000000..06d7793da47 --- /dev/null +++ b/pkgs/os-specific/linux/dstat/fix_pluginpath.patch @@ -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: |