diff options
author | xeji <36407913+xeji@users.noreply.github.com> | 2018-09-09 22:25:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-09 22:25:06 +0200 |
commit | 12fae6e5c7d048e2e0f70637ed6e4903a04a5827 (patch) | |
tree | fae33876f30573ac8927cf9a858dda188379291d | |
parent | 4ab5625c9524c8e73f8f9d2c3c7ada276e60a63e (diff) | |
parent | b633fc4fb4b3bbd44b4bbb1d29d3f3fa642991f5 (diff) | |
download | nixlib-12fae6e5c7d048e2e0f70637ed6e4903a04a5827.tar nixlib-12fae6e5c7d048e2e0f70637ed6e4903a04a5827.tar.gz nixlib-12fae6e5c7d048e2e0f70637ed6e4903a04a5827.tar.bz2 nixlib-12fae6e5c7d048e2e0f70637ed6e4903a04a5827.tar.lz nixlib-12fae6e5c7d048e2e0f70637ed6e4903a04a5827.tar.xz nixlib-12fae6e5c7d048e2e0f70637ed6e4903a04a5827.tar.zst nixlib-12fae6e5c7d048e2e0f70637ed6e4903a04a5827.zip |
Merge pull request #46440 from knedlsepp/fix-pythonPackages.libusb1
pythonPackages.libusb1: Fix darwin build
-rw-r--r-- | pkgs/development/python-modules/libusb1/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/libusb1/default.nix b/pkgs/development/python-modules/libusb1/default.nix index 245ea90038ea..8a9b5da68ef9 100644 --- a/pkgs/development/python-modules/libusb1/default.nix +++ b/pkgs/development/python-modules/libusb1/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, python, libusb1 }: +{ stdenv, lib, buildPythonPackage, fetchPypi, python, libusb1, pytest }: buildPythonPackage rec { pname = "libusb1"; @@ -9,7 +9,7 @@ buildPythonPackage rec { sha256 = "a49917a2262cf7134396f6720c8be011f14aabfc5cdc53f880cc672c0f39d271"; }; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = '' substituteInPlace usb1/libusb1.py --replace \ "ctypes.util.find_library(base_name)" \ "'${libusb1}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}'" @@ -17,8 +17,12 @@ buildPythonPackage rec { buildInputs = [ libusb1 ]; + checkInputs = [ pytest ]; + checkPhase = '' - ${python.interpreter} -m usb1.testUSB1 + # USBPollerThread is unreliable. Let's not test it. + # See: https://github.com/vpelletier/python-libusb1/issues/16 + py.test -k 'not testUSBPollerThreadExit' usb1/testUSB1.py ''; meta = with stdenv.lib; { |