From bd55969cf971929212dc4b3785dd4d005930a5d9 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 3 Oct 2020 15:03:41 +0100 Subject: [PATCH] pythonPackages.hidapi: fix build on darwin also add pythonImportsCheck --- pkgs/development/python-modules/hidapi/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/hidapi/default.nix b/pkgs/development/python-modules/hidapi/default.nix index b1c21b106b56..9e9e965d3368 100644 --- a/pkgs/development/python-modules/hidapi/default.nix +++ b/pkgs/development/python-modules/hidapi/default.nix @@ -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";