From: florhizome@posteo.net
To: 58501@debbugs.gnu.org
Cc: florhizome <florhizome@posteo.net>
Subject: [bug#58501] [PATCH 2/3] gnu: freedesktop: Add power-profiles-daemon
Date: Fri, 14 Oct 2022 12:02:45 +0000 [thread overview]
Message-ID: <30c42f8604b607345c233c0b60e5330243ecfdbe.1665748966.git.florhizome@posteo.net> (raw)
In-Reply-To: <fccafcd56377a2bbab7b0562265ba99103f4e9ab.1665748966.git.florhizome@posteo.net>
From: florhizome <florhizome@posteo.net>
---
gnu/packages/freedesktop.scm | 55 ++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index d72b18caf5..b6aaf1f1ba 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -990,6 +990,61 @@ (define-public packagekit
manager for the current system.")
(license license:gpl2+)))
+
+(define-public power-profiles-daemon
+ (package
+ (name "power-profiles-daemon")
+ (version "0.12")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/hadess/power-profiles-daemon")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1wqcajbj358zpyj6y4h1v34y2yncq76wqxd0jm431habcly0bqyr"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:configure-flags (list "-Dsystemdsystemunitdir=false")
+ #:glib-or-gtk? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'fake-pkexec
+ (lambda _ (setenv "PKEXEC_UID" "-1")))
+ (add-before 'configure 'correct-polkit-dir
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute*
+ "meson.build"
+ (("polkit_gobject_dep\\.get_pkgconfig_variable\\('policydir'\\)")
+ (string-append "'" out "/share/polkit-1/actions'"))))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (string-append (assoc-ref outputs "out")))
+ (prog (string-append out "/bin/powerprofilesctl")))
+ (wrap-program prog
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
+ (native-inputs
+ (list `(,glib "bin") vala python gobject-introspection pkg-config))
+ (inputs
+ (list upower glib polkit dbus libgudev
+ dbus-glib python python-pygobject))
+ (synopsis "Makes power profiles handling available over D-Bus.")
+ (home-page "https://gitlab.freedesktop.org/hadess/power-profiles-daemon")
+ (description "power-profiles-daemon offers to modify system behaviour based
+ upon user-selected power profiles. There are 3 different power profiles, a
+\"balanced\" default mode, a \"power-saver\" mode, as well as a \"performance\"
+ mode. The first 2 of those are available on every system. The \"performance\"
+ mode is only available on select systems and is implemented by different \"drivers\"
+ based on the system or systems it targets.
+In addition to those 2 or 3 modes (depending on the system), \"actions\" can be hooked
+up to change the behaviour of a particular device. For example, this can be used
+to disable the fast-charging for some USB devices when in power-saver mode.")
+ (license license:gpl3)))
+
(define-public python-libevdev
(package
(name "python-libevdev")
--
2.38.0
next prev parent reply other threads:[~2022-10-14 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 15:39 [bug#58501] [PATCH] gnu: Add userspace desktop services florhizome
2022-10-14 12:02 ` [bug#58501] [PATCH 1/3] gnu: freedesktop: Add iio-sensor-proxy florhizome
2022-10-14 12:02 ` florhizome [this message]
2022-10-14 12:02 ` [bug#58501] [PATCH 3/3] gnu: freedesktop: Add low-memory-monitor florhizome
2022-11-03 20:59 ` [bug#58501] [PATCH v2 1/3] gnu: Add iio-sensor-proxy florhizome
2022-11-03 20:59 ` [bug#58501] [PATCH v2 2/3] gnu: Add power-profiles-daemon florhizome
2022-11-03 20:59 ` [bug#58501] [PATCH v2 3/3] gnu: Add low-memory-monitor florhizome
2023-03-14 15:44 ` [bug#58501] [PATCH] gnu: Add userspace desktop services florhizome
2023-03-14 15:48 ` bug#58501: " Tobias Geerinckx-Rice via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30c42f8604b607345c233c0b60e5330243ecfdbe.1665748966.git.florhizome@posteo.net \
--to=florhizome@posteo.net \
--cc=58501@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).