From 62d800a8c5c4b6abf8df7ebb0c1771775eec386e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 19 Aug 2019 09:35:06 +0200 Subject: [PATCH] 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 --- pkgs/os-specific/linux/iotop/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/iotop/default.nix b/pkgs/os-specific/linux/iotop/default.nix index e2ded7a8fd0..cb882a0dc1f 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; {