From 8d48a4828f0a9ee2b5284ecdcf291c9cb24b72de Mon Sep 17 00:00:00 2001 From: Toast <39011842+toast003@users.noreply.github.com> Date: Sun, 16 Nov 2025 03:59:46 +0100 Subject: [PATCH] handheld-daemon: 3.19.22 -> 4.0.1 --- pkgs/by-name/ha/handheld-daemon/package.nix | 42 ++++++++++++--------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix index eb53fca8b847..baa8c822db25 100644 --- a/pkgs/by-name/ha/handheld-daemon/package.nix +++ b/pkgs/by-name/ha/handheld-daemon/package.nix @@ -2,7 +2,6 @@ lib, python3Packages, fetchFromGitHub, - withAdjustor ? false, # dependencies systemd, @@ -14,18 +13,17 @@ lsof, btrfs-progs, util-linux, - adjustor, }: python3Packages.buildPythonApplication rec { pname = "handheld-daemon"; - version = "3.19.22"; + version = "4.0.1"; pyproject = true; src = fetchFromGitHub { owner = "hhd-dev"; repo = "hhd"; tag = "v${version}"; - hash = "sha256-mvIB2lgFaHMCGEshKvagOFUrvcgEbyUS9VXJpXbvzTs="; + hash = "sha256-31fxfId6jkkNDX2PT14WtgIQsaAiPG0xc0J38jDFvs8="; }; # Handheld-daemon runs some selinux-related utils which are not in nixpkgs. @@ -75,29 +73,37 @@ python3Packages.buildPythonApplication rec { substituteInPlace usr/lib/udev/rules.d/83-hhd.rules \ --replace-fail '/bin/chmod' '${lib.getExe' coreutils "chmod"}' + + substituteInPlace src/adjustor/core/acpi.py \ + --replace-fail '"modprobe"' '"${lib.getExe' kmod "modprobe"}"' + substituteInPlace src/adjustor/fuse/utils.py \ + --replace-fail 'f"mount' 'f"${lib.getExe' util-linux "mount"}' ''; build-system = with python3Packages; [ setuptools ]; - dependencies = - with python3Packages; - [ - evdev - pyserial - pyyaml - rich - setuptools - xlib - ] - ++ lib.optionals withAdjustor [ - adjustor - ]; + dependencies = with python3Packages; [ + evdev + pyserial + pyyaml + rich + setuptools + xlib + pyroute2 + pygobject3 + dbus-python + ]; # This package doesn't have upstream tests. doCheck = false; + pythonImportsCheck = [ + "hhd" + "adjustor" + ]; + postInstall = '' install -Dm644 usr/lib/udev/rules.d/83-hhd.rules -t $out/lib/udev/rules.d/ install -Dm644 usr/lib/udev/hwdb.d/83-hhd.hwdb -t $out/lib/udev/hwdb.d/ @@ -108,7 +114,7 @@ python3Packages.buildPythonApplication rec { description = "Linux support for handheld gaming devices like the Legion Go, ROG Ally, and GPD Win"; platforms = lib.platforms.linux; changelog = "https://github.com/hhd-dev/hhd/releases/tag/${src.tag}"; - license = lib.licenses.gpl3Only; + license = lib.licenses.lgpl21Plus; maintainers = with lib.maintainers; [ toast ];