diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix index 89f4e6e6e04ba..246e3879bb5cf 100644 --- a/pkgs/by-name/ha/handheld-daemon/package.nix +++ b/pkgs/by-name/ha/handheld-daemon/package.nix @@ -1,21 +1,22 @@ -{ config -, fetchFromGitHub -, hidapi -, kmod -, lib -, python3 -, toybox +{ + config, + fetchFromGitHub, + hidapi, + kmod, + lib, + python3, + toybox, }: python3.pkgs.buildPythonApplication rec { pname = "handheld-daemon"; - version = "1.1.0"; + version = "2.6.4"; pyproject = true; src = fetchFromGitHub { owner = "hhd-dev"; repo = "hhd"; rev = "v${version}"; - hash = "sha256-ovLC1BQ98jUaDEMPBzWma4TYSzTF+yE/cMemFdJmqlE="; + hash = "sha256-S77APtE1GGfqnv1IkZdJOSlprPOBtrqVXV60yVMvopg="; }; propagatedBuildInputs = with python3.pkgs; [ @@ -26,17 +27,22 @@ python3.pkgs.buildPythonApplication rec { rich setuptools toybox + xlib ]; # This package doesn't have upstream tests. doCheck = false; - # handheld-daemon contains a fork of the python module `hid`, so this hook - # is borrowed from the `hid` derivation. postPatch = '' - hidapi=${ hidapi }/lib/ + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. + 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|" src/hhd/controller/lib/hid.py + + # The generated udev rules point to /bin/chmod, which does not exist in NixOS + chmod=${toybox}/bin/chmod + sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py ''; postInstall = ''