services/hhhd: init handheld-daemon with tdp
This commit is contained in:
parent
519a274f17
commit
820012785e
5 changed files with 232 additions and 0 deletions
65
pkgs/adjustor/default.nix
Normal file
65
pkgs/adjustor/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
|
||||
buildPythonPackage,
|
||||
setuptools,
|
||||
rich,
|
||||
pyroute2,
|
||||
fuse,
|
||||
pygobject3,
|
||||
dbus-python,
|
||||
|
||||
# Dependencies
|
||||
kmod,
|
||||
util-linux,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "adjustor";
|
||||
version = "3.6.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hhd-dev";
|
||||
repo = "adjustor";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-A5IdwuhsK9umMtsUR7CpREGxbTYuJNPV4MT+6wqcWT8=";
|
||||
};
|
||||
|
||||
# This package relies on several programs expected to be on the user's PATH.
|
||||
# We take a more reproducible approach by patching the absolute path to each of these required
|
||||
# binaries.
|
||||
postPatch = ''
|
||||
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 = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
rich
|
||||
pyroute2
|
||||
fuse
|
||||
pygobject3
|
||||
dbus-python
|
||||
kmod
|
||||
];
|
||||
|
||||
# This package doesn't have upstream tests.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hhd-dev/adjustor/";
|
||||
description = "Adjustor TDP plugin for Handheld Daemon";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ toast ];
|
||||
mainProgram = "hhd";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue