tlp-pd: init at 1.9.0

This commit is contained in:
aleksana
2026-01-01 20:48:30 +08:00
parent 095901e768
commit b4fef8d828

View File

@@ -0,0 +1,60 @@
{
lib,
python3Packages,
tlp,
coreutils,
}:
python3Packages.buildPythonApplication {
pname = "tlp-pd";
inherit (tlp)
version
src
patches
postPatch
;
pyproject = false; # Built with make
dependencies = with python3Packages; [
pygobject3
dbus-python
];
makeFlags = [ "DESTDIR=${placeholder "out"}" ];
installTargets = [
"install-pd"
"install-man-pd"
];
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tlp ]}" ];
postInstall = ''
substituteInPlace $out/share/dbus-1/system-services/*.service \
--replace-fail "/bin/false" "${coreutils}/false"
'';
checkPhase = ''
runHook preCheck
# The program will error out but at least we are not missing python deps
($out/bin/tlpctl --help 2>&1 || true) |\
grep -q 'g-io-error-quark: Could not connect: No such file or directory'
$out/bin/tlp-pd --help
runHook postCheck
'';
meta = {
inherit (tlp.meta)
homepage
changelog
platforms
maintainers
license
;
description = "Power-rofiles-daemon like DBus interface for TLP";
mainProgram = "tlp-pd";
};
}