summary refs log tree commit diff
path: root/pkgs/development/python-modules/wcwidth
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-06-07 10:39:08 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-06-11 10:00:25 +0200
commitf1a4e82a1aaf39133959b57a78c010084f5b3e7d (patch)
treea4b1d57d61e748811cdbdd1f9fea6bb5f3fe2fc1 /pkgs/development/python-modules/wcwidth
parent1ed7eb71b7bd4fc2b29bb610de167c8376ed8be0 (diff)
downloadnixpkgs-f1a4e82a1aaf39133959b57a78c010084f5b3e7d.tar
nixpkgs-f1a4e82a1aaf39133959b57a78c010084f5b3e7d.tar.gz
nixpkgs-f1a4e82a1aaf39133959b57a78c010084f5b3e7d.tar.bz2
nixpkgs-f1a4e82a1aaf39133959b57a78c010084f5b3e7d.tar.lz
nixpkgs-f1a4e82a1aaf39133959b57a78c010084f5b3e7d.tar.xz
nixpkgs-f1a4e82a1aaf39133959b57a78c010084f5b3e7d.tar.zst
nixpkgs-f1a4e82a1aaf39133959b57a78c010084f5b3e7d.zip
python.pkgs.wcwidth: fix build
Diffstat (limited to 'pkgs/development/python-modules/wcwidth')
-rw-r--r--pkgs/development/python-modules/wcwidth/default.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/wcwidth/default.nix b/pkgs/development/python-modules/wcwidth/default.nix
index b51e13df2e8..b93ca1dbb4d 100644
--- a/pkgs/development/python-modules/wcwidth/default.nix
+++ b/pkgs/development/python-modules/wcwidth/default.nix
@@ -1,4 +1,7 @@
-{ lib, fetchPypi, buildPythonPackage, pytest }:
+{ lib, fetchPypi, buildPythonPackage, pytestCheckHook
+, isPy3k
+, backports_functools_lru_cache
+}:
 
 buildPythonPackage rec {
   pname = "wcwidth";
@@ -9,15 +12,15 @@ buildPythonPackage rec {
     sha256 = "edbc2b718b4db6cdf393eefe3a420183947d6aa312505ce6754516f458ff8830";
   };
 
-  checkInputs = [ pytest ];
+  checkInputs = [ pytestCheckHook ];
+
+  propagatedBuildInputs = lib.optionals (!isPy3k) [
+    backports_functools_lru_cache
+  ];
 
   # To prevent infinite recursion with pytest
   doCheck = false;
 
-  checkPhase = ''
-    pytest
-  '';
-
   meta = with lib; {
     description = "Measures number of Terminal column cells of wide-character codes";
     longDescription = ''