nixpkgs-overlay/pkgs/hid/default.nix

30 lines
472 B
Nix
Raw Normal View History

2020-04-04 14:40:22 +02:00
{ stdenv, python3, hidapi }:
with python3.pkgs;
buildPythonPackage rec {
pname = "hid";
version = "1.0.3";
NIX_HIDAPI_PATH = "${hidapi}/lib/";
patches = [ ./paths.patch ];
postPatch = ''
substituteInPlace hid/__init__.py \
--subst-var NIX_HIDAPI_PATH
'';
src = fetchPypi {
inherit pname version;
sha256 = "0w2ns88garrk6vjz3i91v6xzmlavyscifx4vm49303khgl2dqgvl";
};
propagatedBuildInputs = [
hidapi
];
doCheck = false;
}