* [bug#70460] [PATCH 1/4] gnu: power-profiles-daemon: Update to 0.21.
[not found] <cover.1713463209.git.dariqq@posteo.net>
@ 2024-04-18 18:36 ` Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 2/4] gnu: power-profiles-daemon: Build gtk-docs Dariqq
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Dariqq @ 2024-04-18 18:36 UTC (permalink / raw)
To: 70460; +Cc: Dariqq
* gnu/packages/freedesktop (power-profiles-daemon): Update to 0.21.
[origin]<url>: Update repository url.
[homepage]: Update homepage.
[#:configure-flags]: Enable zsh completions, disable systemd-unit and
pylint.
[#:glib-or-gtk?]: Set to default value of #f.
[#:phases]<'fake-pkexec>: Remove phase, seems no longer necessary.
<'correct-polkit-dir>: Change to setting envvar instead.
<'wrap-program>: Remove GI_TYPELIB_PATH from wrapper.
[native-inputs]: Add python-argparse-manpage, python-dbusmock, python-shtab,
umockdev.
[inputs]: Add bash-completion.
Change-Id: I71220957ef6f4d224cc4c528562fe0565505aae1
---
gnu/packages/freedesktop.scm | 37 +++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 78443d6f5c..e30d9a218f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1154,40 +1154,47 @@ (define-public packagekit
(define-public power-profiles-daemon
(package
(name "power-profiles-daemon")
- (version "0.12")
+ (version "0.21")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://gitlab.freedesktop.org/hadess/power-profiles-daemon")
+ (url "https://gitlab.freedesktop.org/upower/power-profiles-daemon")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
- "1wqcajbj358zpyj6y4h1v34y2yncq76wqxd0jm431habcly0bqyr"))))
+ "0dn3ygv49q7mzs52ch3yphxf4hbry698r1ajj52f6jgw7mpwr5p4"))))
(build-system meson-build-system)
(arguments
- (list #:configure-flags #~(list "-Dsystemdsystemunitdir=false")
- #:glib-or-gtk? #t
+ (list #:configure-flags #~(list "-Dsystemdsystemunitdir="
+ "-Dpylint=disabled"
+ (string-append "-Dzshcomp=" #$output
+ "/share/zsh/site-functions/"))
#: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'")))))
+ (setenv "PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR"
+ (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")))))))))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))))))))
(native-inputs
- (list `(,glib "bin") gobject-introspection pkg-config python vala))
+ (list `(,glib "bin")
+ gobject-introspection
+ pkg-config
+ python
+ python-argparse-manpage
+ python-dbusmock
+ python-shtab
+ umockdev
+ vala))
(inputs
- (list bash-minimal ;for 'wrap-program'
+ (list bash-minimal ;for 'wrap-program'
+ bash-completion
dbus
dbus-glib
libgudev
@@ -1195,7 +1202,7 @@ (define-public power-profiles-daemon
python
python-pygobject
upower))
- (home-page "https://gitlab.freedesktop.org/hadess/power-profiles-daemon")
+ (home-page "https://gitlab.freedesktop.org/upower/power-profiles-daemon")
(synopsis "Power profile handling over D-Bus")
(description
"power-profiles-daemon offers to modify system behaviour based upon
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#70460] [PATCH 2/4] gnu: power-profiles-daemon: Build gtk-docs.
[not found] <cover.1713463209.git.dariqq@posteo.net>
2024-04-18 18:36 ` [bug#70460] [PATCH 1/4] gnu: power-profiles-daemon: Update to 0.21 Dariqq
@ 2024-04-18 18:36 ` Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 3/4] gnu: power-profiles-daemon: Remove some (native) inputs Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 4/4] gnu: services: Add power-profiles-daemon-service-type Dariqq
3 siblings, 0 replies; 6+ messages in thread
From: Dariqq @ 2024-04-18 18:36 UTC (permalink / raw)
To: 70460; +Cc: Dariqq
* gnu/packages/freedesktop.scm (power-profiles-daemon):
[#:configure-flags]: Enable building gtk-docs.
[inputs]: Add gtk-doc/stable, libxslt for docs.
Change-Id: I1bc6047858d2b5188e714f39da8b760bc6a71078
---
gnu/packages/freedesktop.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e30d9a218f..6ea5a70e21 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1169,6 +1169,7 @@ (define-public power-profiles-daemon
(arguments
(list #:configure-flags #~(list "-Dsystemdsystemunitdir="
"-Dpylint=disabled"
+ "-Dgtk_doc=true"
(string-append "-Dzshcomp=" #$output
"/share/zsh/site-functions/"))
#:phases
@@ -1184,7 +1185,9 @@ (define-public power-profiles-daemon
`("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))))))))
(native-inputs
(list `(,glib "bin")
+ gtk-doc/stable
gobject-introspection
+ libxslt
pkg-config
python
python-argparse-manpage
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#70460] [PATCH 3/4] gnu: power-profiles-daemon: Remove some (native) inputs.
[not found] <cover.1713463209.git.dariqq@posteo.net>
2024-04-18 18:36 ` [bug#70460] [PATCH 1/4] gnu: power-profiles-daemon: Update to 0.21 Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 2/4] gnu: power-profiles-daemon: Build gtk-docs Dariqq
@ 2024-04-18 18:36 ` Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 4/4] gnu: services: Add power-profiles-daemon-service-type Dariqq
3 siblings, 0 replies; 6+ messages in thread
From: Dariqq @ 2024-04-18 18:36 UTC (permalink / raw)
To: 70460; +Cc: Dariqq
These don't seem necesary anymore.
* gnu/packages/freedesktop.scm (power-profiles-daemon):
[native-inputs]: Remove gobject-introspection, vala.
[inputs]: Remove dbus, dbus-glib, python, python-pygobjet.
Change-Id: I266d4d5d8da7ba3608f2b61726d81409a8a99cf8
---
gnu/packages/freedesktop.scm | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6ea5a70e21..5ac90b7250 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1186,24 +1186,19 @@ (define-public power-profiles-daemon
(native-inputs
(list `(,glib "bin")
gtk-doc/stable
- gobject-introspection
libxslt
pkg-config
python
python-argparse-manpage
python-dbusmock
python-shtab
- umockdev
- vala))
+ umockdev))
(inputs
(list bash-minimal ;for 'wrap-program'
bash-completion
- dbus
- dbus-glib
libgudev
- glib polkit
- python
- python-pygobject
+ glib
+ polkit
upower))
(home-page "https://gitlab.freedesktop.org/upower/power-profiles-daemon")
(synopsis "Power profile handling over D-Bus")
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#70460] [PATCH 4/4] gnu: services: Add power-profiles-daemon-service-type.
[not found] <cover.1713463209.git.dariqq@posteo.net>
` (2 preceding siblings ...)
2024-04-18 18:36 ` [bug#70460] [PATCH 3/4] gnu: power-profiles-daemon: Remove some (native) inputs Dariqq
@ 2024-04-18 18:36 ` Dariqq
2024-05-01 16:43 ` Félix Baylac Jacqué
3 siblings, 1 reply; 6+ messages in thread
From: Dariqq @ 2024-04-18 18:36 UTC (permalink / raw)
To: 70460; +Cc: Dariqq
* gnu/services/pm.scm
(power-profiles-configuration): New configuration.
(power-profiles-daemon-shepherd-service): New function.
(power-profiles-daemon-service-type): New function.
(power-profiles-daemon-activation): New variable.
Change-Id: Ib035d993ed82eec2a43f3ba2b4c92f77e08a0fd7
---
gnu/services/pm.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 3daf484cc1..bedeebb9d8 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -21,18 +21,72 @@ (define-module (gnu services pm)
#:use-module (guix packages)
#:use-module (guix records)
#:use-module (gnu packages admin)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages linux)
#:use-module (gnu services)
#:use-module (gnu services base)
#:use-module (gnu services configuration)
+ #:use-module (gnu services dbus)
#:use-module (gnu services shepherd)
#:use-module (gnu system shadow)
- #:export (tlp-service-type
+ #:export (power-profiles-daemon-service-type
+ power-profiles-daemon-configuration
+
+ tlp-service-type
tlp-configuration
thermald-configuration
thermald-service-type))
+;;;
+;;; power-profiles-daemon
+;;;
+
+(define-configuration/no-serialization power-profiles-daemon-configuration
+ (power-profiles-daemon
+ (file-like power-profiles-daemon)
+ "The power-profiles-daemon package."))
+
+(define (power-profiles-daemon-shepherd-service config)
+ (match-record
+ config <power-profiles-daemon-configuration>
+ (power-profiles-daemon)
+ (list (shepherd-service (provision '(power-profiles-daemon))
+ (requirement '(dbus-system))
+ (documentation "Run the power-profiles-daemon.")
+ (start #~(make-forkexec-constructor
+ (list #$(file-append power-profiles-daemon
+ "/libexec/power-profiles-daemon"))))
+ (stop #~(make-kill-destructor))))))
+
+(define %power-profiles-daemon-activation
+ #~(begin
+ (use-modules (guix build utils))
+ (mkdir-p "/var/lib/power-profiles-daemon")))
+
+(define power-profiles-daemon-service-type
+ (let ((config->package
+ (compose list power-profiles-daemon-configuration-power-profiles-daemon)))
+ (service-type
+ (name 'power-profiles-daemon)
+ (extensions (list
+ (service-extension shepherd-root-service-type
+ power-profiles-daemon-shepherd-service)
+ (service-extension dbus-root-service-type
+ config->package)
+ (service-extension polkit-service-type
+ config->package)
+ (service-extension profile-service-type
+ config->package)
+ (service-extension activation-service-type
+ (const %power-profiles-daemon-activation))))
+ (default-value (power-profiles-daemon-configuration))
+ (description "Run the power-profiles-daemon"))))
+
+;;;
+;;; tlp
+;;;
+
(define (uglify-field-name field-name)
(let ((str (symbol->string field-name)))
(string-join (string-split
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#70460] [PATCH 4/4] gnu: services: Add power-profiles-daemon-service-type.
2024-04-18 18:36 ` [bug#70460] [PATCH 4/4] gnu: services: Add power-profiles-daemon-service-type Dariqq
@ 2024-05-01 16:43 ` Félix Baylac Jacqué
2024-05-01 21:16 ` Dariqq
0 siblings, 1 reply; 6+ messages in thread
From: Félix Baylac Jacqué @ 2024-05-01 16:43 UTC (permalink / raw)
To: Dariqq, 70460
Hey Dariqq,
Thanks for this!
I would like to bump this patchset in the hope it catches the attention
of a maintainer. It sadly do not apply cleanly on current master
anymore.
This daemon is pretty important for laptops. This is the daemon used to
tune the CPU power efficiency by multiple DE: Gnome, KDE, Waybar, and
likely others I'm not aware of.
Power-profiles-daemon is meant to be launched as a system service, not
by dbus itself. This patchset is crutial to get a functional
power-profiles-daemon setup.
I'm also a Guix rookie, so I can't really help wrt. the service
definitions best practices.
I maintain this package on NixOS, I have a bit of experience with it,
and the packaging part looks fine overall. I'm not 100% sure generating
the gtk-doc is worth the closure size increase, but I think it's fine
for now, it shouldn't be a show-stopper.
I'm using this patchset on my system, it works as intended, it'd be
great to see it merged.
What should we do to get this moving forward? I'm up to help in the
process if neccessary.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#70460] [PATCH 4/4] gnu: services: Add power-profiles-daemon-service-type.
2024-05-01 16:43 ` Félix Baylac Jacqué
@ 2024-05-01 21:16 ` Dariqq
0 siblings, 0 replies; 6+ messages in thread
From: Dariqq @ 2024-05-01 21:16 UTC (permalink / raw)
To: Félix Baylac Jacqué, 70460
Hi Félix,
On 01.05.24 18:43, Félix Baylac Jacqué wrote:
> Hey Dariqq,
>
> Thanks for this!
>
> I would like to bump this patchset in the hope it catches the attention
> of a maintainer. It sadly do not apply cleanly on current master
> anymore.
There some issues that qa is unable to build the package on x86_64 due
to tests timing out (and possibly other problems with tests?).
See
https://data.qa.guix.gnu.org/gnu/store/5h0j710311kcz9hz87dznz97xirfzgpx-power-profiles-daemon-0.21.drv.
It seems fine for aarch64 and powerpc64le.
I am not really sure what's causing this as the tests are all fine for
me locally. Maybe increasing the timeout window in the tests could
improve this?
>
> This daemon is pretty important for laptops. This is the daemon used to
> tune the CPU power efficiency by multiple DE: Gnome, KDE, Waybar, and
> likely others I'm not aware of.
>
> Power-profiles-daemon is meant to be launched as a system service, not
> by dbus itself. This patchset is crutial to get a functional
> power-profiles-daemon setup.
>
Great. The dbus service acts then just as a dummy to make the name
available.
> I'm also a Guix rookie, so I can't really help wrt. the service
> definitions best practices.
>
I also forgot include a short documentation for the service in
doc/guix.texi. I have not yet looked into writing texinfo manuals but
hopefully will get to do that later this week.
> I maintain this package on NixOS, I have a bit of experience with it,
> and the packaging part looks fine overall. I'm not 100% sure generating
> the gtk-doc is worth the closure size increase, but I think it's fine
> for now, it shouldn't be a show-stopper.
I guess I could move them to a seperate output. Though this does not
address closure size.
>
> I'm using this patchset on my system, it works as intended, it'd be
> great to see it merged.
Awesome.
>
> What should we do to get this moving forward? I'm up to help in the
> process if neccessary.
I'd say fixing the build on the build farm, adding the missing manual
entry and getting the attention of someone who knows more about services.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-02 13:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1713463209.git.dariqq@posteo.net>
2024-04-18 18:36 ` [bug#70460] [PATCH 1/4] gnu: power-profiles-daemon: Update to 0.21 Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 2/4] gnu: power-profiles-daemon: Build gtk-docs Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 3/4] gnu: power-profiles-daemon: Remove some (native) inputs Dariqq
2024-04-18 18:36 ` [bug#70460] [PATCH 4/4] gnu: services: Add power-profiles-daemon-service-type Dariqq
2024-05-01 16:43 ` Félix Baylac Jacqué
2024-05-01 21:16 ` Dariqq
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).