nixpkgs/pkgs/development/python-modules/hid/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

34 lines
789 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, hidapi
, nose
}:
buildPythonPackage rec {
pname = "hid";
version = "1.0.5";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "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 ];
};
}