python3Packages.pyusb: fix build

This commit is contained in:
Jonathan Ringer 2020-11-29 13:35:31 -08:00 committed by Frederik Rietdijk
parent 754cd330ba
commit 23db404965

View file

@ -1,4 +1,4 @@
{ stdenv, fetchPypi, buildPythonPackage, libusb1 }:
{ stdenv, fetchPypi, buildPythonPackage, libusb1, setuptools_scm }:
buildPythonPackage rec {
pname = "pyusb";
@ -9,6 +9,10 @@ buildPythonPackage rec {
sha256 = "d69ed64bff0e2102da11b3f49567256867853b861178689671a163d30865c298";
};
nativeBuildInputs = [
setuptools_scm
];
# Fix the USB backend library lookup
postPatch =
''
@ -20,6 +24,8 @@ buildPythonPackage rec {
# No tests included
doCheck = false;
pythonImportsCheck = [ "usb" ];
meta = with stdenv.lib; {
description = "Python USB access module (wraps libusb 1.0)"; # can use other backends
homepage = "https://pyusb.github.io/pyusb/";