pythonPackages.hidapi: fix build on darwin

also add pythonImportsCheck
This commit is contained in:
Robert Scott 2020-10-03 15:03:41 +01:00
parent cb4ca87504
commit bd55969cf9

View file

@ -19,8 +19,12 @@ buildPythonPackage rec {
libusb=${libusb1.dev}/include/libusb-1.0
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py --replace 'macos_sdk_path =' 'macos_sdk_path = "" #'
'';
pythonImportsCheck = [ "hid" ];
meta = with stdenv.lib; {
description = "A Cython interface to the hidapi from https://github.com/signal11/hidapi";
homepage = "https://github.com/trezor/cython-hidapi";