emacsPackages.lsp-bridge: 0-unstable-2025-01-11 -> 0-unstable-2025-01-22 (#376531)
[NixPkgs.git] / pkgs / development / python-modules / hidapi / default.nix
blob5c1fdda9484fdd19d656950ae3096ae362078089
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchPypi,
6   xcbuild,
7   cython_0,
8   udev,
9   darwin,
12 buildPythonPackage rec {
13   pname = "hidapi";
14   version = "0.14.0.post2";
15   format = "setuptools";
17   src = fetchPypi {
18     inherit pname version;
19     sha256 = "sha256-bA6XumsFmjCdUbSVqPDV77zqh1a2QNmLb2u5/e8kWKw=";
20   };
22   nativeBuildInputs = [ cython_0 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ];
24   propagatedBuildInputs =
25     lib.optionals stdenv.hostPlatform.isLinux [ udev ]
26     ++ lib.optionals stdenv.hostPlatform.isDarwin (
27       with darwin.apple_sdk.frameworks;
28       [
29         AppKit
30         CoreFoundation
31         IOKit
32       ]
33     );
35   pythonImportsCheck = [ "hid" ];
37   meta = with lib; {
38     description = "Cython interface to the hidapi from https://github.com/libusb/hidapi";
39     homepage = "https://github.com/trezor/cython-hidapi";
40     # license can actually be either bsd3 or gpl3
41     # see https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt
42     license = with licenses; [
43       bsd3
44       gpl3Only
45     ];
46     maintainers = with maintainers; [
47       np
48       prusnak
49     ];
50   };