summary refs log tree commit diff
path: root/pkgs/development/python-modules/libusb1/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/libusb1/default.nix')
-rw-r--r--pkgs/development/python-modules/libusb1/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/libusb1/default.nix b/pkgs/development/python-modules/libusb1/default.nix
index 0d8142645e1..7d921a9c897 100644
--- a/pkgs/development/python-modules/libusb1/default.nix
+++ b/pkgs/development/python-modules/libusb1/default.nix
@@ -1,27 +1,27 @@
-{ lib, stdenv, buildPythonPackage, fetchPypi, libusb1, pytest }:
+{ lib, stdenv, buildPythonPackage, fetchPypi, libusb1, pytestCheckHook }:
 
 buildPythonPackage rec {
   pname = "libusb1";
-  version = "1.9.3";
+  version = "1.10.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "60e6ce37be064f6e51d02b25da44230ecc9c0b1fdb6f14568c71457d963c1749";
+    sha256 = "8d70e5ef11a9facf304e696cc1d571c526bd9e02a8710a045b3b2567db7a54e0";
   };
 
   postPatch = ''
-    substituteInPlace usb1/libusb1.py --replace \
+    substituteInPlace usb1/_libusb1.py --replace \
       "ctypes.util.find_library(base_name)" \
       "'${libusb1}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}'"
   '';
 
   buildInputs = [ libusb1 ];
 
-  checkInputs = [ pytest ];
+  checkInputs = [ pytestCheckHook ];
 
-  checkPhase = ''
-    py.test usb1/testUSB1.py
-  '';
+  pytestFlagsArray = [
+    "usb1/testUSB1.py"
+  ];
 
   meta = with lib; {
     homepage    = "https://github.com/vpelletier/python-libusb1";