Skip to content

Commit

Permalink
fixup! python3Packages.hidapi: 0.14.0.post2 -> 0.14.0.post4
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukium committed Jan 20, 2025
1 parent 337e504 commit c986a70
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
26 changes: 22 additions & 4 deletions pkgs/development/python-modules/hidapi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,41 @@
stdenv,
buildPythonPackage,
fetchPypi,
pkg-config,
xcbuild,
cython_0,
cython,
setuptools,
hidapi,
libusb1,
udev,
darwin,
}:

buildPythonPackage rec {
pname = "hidapi";
version = "0.14.0.post4";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "sha256-SPziU+Um0XtmP7+ZicccfvdlPO1fS+ZfFDfDE/s9vfY=";
hash = "sha256-SPziU+Um0XtmP7+ZicccfvdlPO1fS+ZfFDfDE/s9vfY=";
};

nativeBuildInputs = [ cython_0 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ];
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 ]
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5906,7 +5906,7 @@ self: super: with self; {
};

hidapi = callPackage ../development/python-modules/hidapi {
inherit (pkgs) udev;
inherit (pkgs) hidapi udev;
};

hid-parser = callPackage ../development/python-modules/hid-parser { };
Expand Down

0 comments on commit c986a70

Please sign in to comment.