handheld-daemon: 3.19.22 -> 4.0.1

This commit is contained in:
Toast
2025-11-16 03:59:46 +01:00
parent 6213355d87
commit 8d48a4828f
+24 -18
View File
@@ -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
];