python3Packages.hid: init at 1.0.4
This commit is contained in:
parent
3f1061c72b
commit
a4fccd0a64
34
pkgs/development/python-modules/hid/default.nix
Normal file
34
pkgs/development/python-modules/hid/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, hidapi
|
||||
, nose
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "hid";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-9hsDgvN6M0vIuoYEvIS5SHXuT1lPu6+CssOz6CeIP8E=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ hidapi ];
|
||||
|
||||
checkInputs = [ nose ];
|
||||
|
||||
postPatch = lib.optionalString stdenv.isLinux ''
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -3230,6 +3230,10 @@ in {
|
||||
|
||||
hickle = callPackage ../development/python-modules/hickle { };
|
||||
|
||||
hid = callPackage ../development/python-modules/hid {
|
||||
inherit (pkgs) hidapi;
|
||||
};
|
||||
|
||||
hidapi = callPackage ../development/python-modules/hidapi {
|
||||
inherit (pkgs) udev libusb1;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user