about summary refs log tree commit diff
path: root/pkgs/development/python-modules/readchar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/readchar/default.nix')
-rw-r--r--pkgs/development/python-modules/readchar/default.nix34
1 files changed, 28 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/readchar/default.nix b/pkgs/development/python-modules/readchar/default.nix
index c83a2bba1cd6a..81c489bd8c09d 100644
--- a/pkgs/development/python-modules/readchar/default.nix
+++ b/pkgs/development/python-modules/readchar/default.nix
@@ -1,19 +1,41 @@
-{ lib, buildPythonPackage, fetchFromGitHub, flake8, pytest, pytest-cov, pexpect }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+
+# native
+, flake8
+
+# tests
+, pytestCheckHook
+, pexpect
+}:
 
 buildPythonPackage rec {
   pname = "readchar";
-  version = "2.0.0";
+  version = "3.0.5";
+  format = "setuptools";
 
   # Don't use wheels on PyPI
   src = fetchFromGitHub {
     owner = "magmax";
     repo = "python-${pname}";
-    rev = version;
-    sha256 = "0j1vj4f2j8x5f40rs6h8qplklcxcdbvkkvjpkpmr1xagw05i12bm";
+    rev = "v${version}";
+    sha256 = "sha256:01bjw3ipdzxq1ijn9354nlya625i26ri7jac1dnlj1d1gdd8m5lx";
   };
 
-  nativeBuildInputs = [ flake8 ];
-  checkInputs = [ pytest pytest-cov pexpect ];
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "--cov readchar" ""
+  '';
+
+  nativeBuildInputs = [
+    flake8
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    pexpect
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/magmax/python-readchar";