Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
pkg-config,
|
|
xcbuild,
|
|
cython,
|
|
setuptools,
|
|
hidapi,
|
|
libusb1,
|
|
udev,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "hidapi";
|
|
version = "0.14.0.post4";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-SPziU+Um0XtmP7+ZicccfvdlPO1fS+ZfFDfDE/s9vfY=";
|
|
};
|
|
|
|
build-system = [
|
|
cython
|
|
setuptools
|
|
];
|
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
|
hidapi
|
|
libusb1
|
|
];
|
|
|
|
env = lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
|
HIDAPI_SYSTEM_HIDAPI = true;
|
|
};
|
|
|
|
propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ udev ];
|
|
|
|
pythonImportsCheck = [ "hid" ];
|
|
|
|
meta = with lib; {
|
|
description = "Cython interface to the hidapi from https://github.com/libusb/hidapi";
|
|
homepage = "https://github.com/trezor/cython-hidapi";
|
|
# license can actually be either bsd3 or gpl3
|
|
# see https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt
|
|
license = with licenses; [
|
|
bsd3
|
|
gpl3Only
|
|
];
|
|
maintainers = with maintainers; [
|
|
np
|
|
prusnak
|
|
];
|
|
};
|
|
}
|