about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-11-29 13:35:31 -0800
committerFrederik Rietdijk <fridh@fridh.nl>2020-12-01 14:44:24 +0100
commit23db4049656d616bcaf5acee871292eaeec58825 (patch)
tree5f7dfb89dc23d31a81df2f8a6530984eeca30d35
parent754cd330baeb4a3d54e69f16ee8f40ea99e9b982 (diff)
python3Packages.pyusb: fix build
-rw-r--r--pkgs/development/python-modules/pyusb/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/pyusb/default.nix b/pkgs/development/python-modules/pyusb/default.nix
index e875d541cc938..7e5fc90453ff0 100644
--- a/pkgs/development/python-modules/pyusb/default.nix
+++ b/pkgs/development/python-modules/pyusb/default.nix
@@ -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/";