From 9e52af5181bb4e1ab20db8e04ab64a4833a06266 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 10 Oct 2021 02:22:29 +0200 Subject: [PATCH] python3Packages.libusb1: update libusb path substiution The code was moved into _libusb1.py. Also migrate to pytestCheckHook. --- pkgs/development/python-modules/libusb1/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/libusb1/default.nix b/pkgs/development/python-modules/libusb1/default.nix index c62b5c654c1e..7d921a9c8976 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";