summary refs log tree commit diff
path: root/pkgs/development/python-modules/libusb1
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2021-10-10 02:22:29 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2021-10-11 01:22:10 +0200
commit9e52af5181bb4e1ab20db8e04ab64a4833a06266 (patch)
treee40effb7d3d22bddfc4a189ffc3725f9e36db64f /pkgs/development/python-modules/libusb1
parent61f3313bb0179c13060f06709648f3c09b1b5ed3 (diff)
downloadnixpkgs-9e52af5181bb4e1ab20db8e04ab64a4833a06266.tar
nixpkgs-9e52af5181bb4e1ab20db8e04ab64a4833a06266.tar.gz
nixpkgs-9e52af5181bb4e1ab20db8e04ab64a4833a06266.tar.bz2
nixpkgs-9e52af5181bb4e1ab20db8e04ab64a4833a06266.tar.lz
nixpkgs-9e52af5181bb4e1ab20db8e04ab64a4833a06266.tar.xz
nixpkgs-9e52af5181bb4e1ab20db8e04ab64a4833a06266.tar.zst
nixpkgs-9e52af5181bb4e1ab20db8e04ab64a4833a06266.zip
python3Packages.libusb1: update libusb path substiution
The code was moved into _libusb1.py. Also migrate to pytestCheckHook.
Diffstat (limited to 'pkgs/development/python-modules/libusb1')
-rw-r--r--pkgs/development/python-modules/libusb1/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/libusb1/default.nix b/pkgs/development/python-modules/libusb1/default.nix
index c62b5c654c1..7d921a9c897 100644
--- a/pkgs/development/python-modules/libusb1/default.nix
+++ b/pkgs/development/python-modules/libusb1/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, buildPythonPackage, fetchPypi, libusb1, pytest }:
+{ lib, stdenv, buildPythonPackage, fetchPypi, libusb1, pytestCheckHook }:
 
 buildPythonPackage rec {
   pname = "libusb1";
@@ -10,18 +10,18 @@ buildPythonPackage rec {
   };
 
   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";