GNU bug report logs - #58501
[PATCH] gnu: Add userspace desktop services

Previous Next

Package: guix-patches;

Reported by: florhizome <florhizome <at> posteo.net>

Date: Thu, 13 Oct 2022 17:48:02 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 58501 <at> debbugs.gnu.org (full text, mbox):

From: florhizome <at> posteo.net
To: 58501 <at> debbugs.gnu.org
Cc: florhizome <florhizome <at> posteo.net>
Subject: [PATCH v2 2/3] gnu: Add power-profiles-daemon
Date: Thu,  3 Nov 2022 20:59:55 +0000
From: florhizome <florhizome <at> posteo.net>

* gnu/packages/freedesktop.scm (Add power-profiles-daemon): New variable.
---
 gnu/packages/freedesktop.scm | 57 ++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 8190f59c48..5c2cc16345 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -990,6 +990,63 @@ (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
+     (list #: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 _
+                   (substitute* "meson.build"
+                     (("polkit_gobject_dep\\..*")
+                      (string-append "'" #$output "/share/polkit-1/actions'")))))
+               (add-after 'install 'wrap-program
+                 (lambda _
+                   (wrap-program
+                       (string-append #$output "/bin/powerprofilesctl")
+                     `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
+                     `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs
+     (list `(,glib "bin") gobject-introspection pkg-config python vala))
+    (inputs
+     (list dbus
+           dbus-glib
+           libgudev
+           glib polkit
+           python
+           python-pygobject
+           upower))
+    (home-page "https://gitlab.freedesktop.org/hadess/power-profiles-daemon")
+    (synopsis "Power profile handling over D-Bus")
+    (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





This bug report was last modified 2 years and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.