about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-08-19 09:35:06 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2019-08-19 09:47:53 +0200
commit62d800a8c5c4b6abf8df7ebb0c1771775eec386e (patch)
treed92b66c65742293321b36df81a23297517aa5b40
parent9defd3e3e39f7c26abb8ed146cfc43fc2e59b6c1 (diff)
iotop: use python3
The support of python2 will be dropped by the end of 2019, so python3
should be used by default here. In fact, this package supports both
python v2 and v3, however the installation with python3 broke because of a
bug in setup.py which is only fixed in the upstream's master[1].

Additionally, distros like debian already use iotop along with python3[2],
so this should be a sensible thing to do.

[1] https://repo.or.cz/iotop.git?a=commit;h=99c8d7cedce81f17b851954d94bfa73787300599
[2] https://packages.debian.org/de/buster/iotop
-rw-r--r--pkgs/os-specific/linux/iotop/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/iotop/default.nix b/pkgs/os-specific/linux/iotop/default.nix
index e2ded7a8fd0ca..cb882a0dc1feb 100644
--- a/pkgs/os-specific/linux/iotop/default.nix
+++ b/pkgs/os-specific/linux/iotop/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, python2Packages }:
+{ stdenv, fetchurl, python3Packages, fetchpatch }:
 
-python2Packages.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
   name = "iotop-0.6";
 
   src = fetchurl {
@@ -8,6 +8,13 @@ python2Packages.buildPythonApplication rec {
     sha256 = "0nzprs6zqax0cwq8h7hnszdl3d2m4c2d4vjfxfxbnjfs9sia5pis";
   };
 
+  patches = [
+    (fetchpatch {
+      url = https://repo.or.cz/iotop.git/patch/99c8d7cedce81f17b851954d94bfa73787300599;
+      sha256 = "0rdgz6xpmbx77lkr1ixklliy1aavdsjmfdqvzwrjylbv0xh5wc8z";
+    })
+  ];
+
   doCheck = false;
 
   meta = with stdenv.lib; {