Skip to content

Commit

Permalink
handheld-daemon: undo refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
toast003 committed Apr 17, 2024
1 parent cb2fa9a commit d9b487a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkgs/by-name/ha/handheld-daemon/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@ python3.pkgs.buildPythonApplication rec {
doCheck = false;

postPatch = ''
# The generated udev rules point to /bin/chmod, which does not exist in NixOS
substituteInPlace src/hhd/controller/lib/hide.py \
--replace-fail /bin/chmod ${toybox}/bin/chmod
# handheld-daemon contains a fork of the python module `hid`, so this hook
# is borrowed from the `hid` derivation.
substituteInPlace src/hhd/controller/lib/hid.py \
--replace-fail libhidapi ${hidapi}/lib/libhidapi
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 = ''
Expand Down

0 comments on commit d9b487a

Please sign in to comment.