a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
33 lines
766 B
Nix
33 lines
766 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, hidapi
|
|
, nose
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "hid";
|
|
version = "1.0.5";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-HpVOf3q5t8nfx421lQRpLBfbO3EklJK5drFSW5fbsOg=";
|
|
};
|
|
|
|
propagatedBuildInputs = [ hidapi ];
|
|
|
|
nativeCheckInputs = [ nose ];
|
|
|
|
postPatch = ''
|
|
hidapi=${hidapi}/lib/
|
|
test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }
|
|
sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "hidapi bindings in ctypes";
|
|
homepage = "https://github.com/apmorton/pyhidapi";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
};
|
|
}
|