gnu: power-profiles-daemon: Update to 0.21.

* 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. Remove native python
inputs from PYTHONPATH.
[native-inputs]: Add python-argparse-manpage, python-dbusmock, python-shtab,
umockdev. Remove gobject-introspection, vala.
[inputs]: Add bash-completion. Remove dbus, dbus-glib.

Change-Id: I71220957ef6f4d224cc4c528562fe0565505aae1
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
Dariqq 2024-05-02 15:37:54 +00:00 committed by Christopher Baines
parent dfdad66f5a
commit d53ce69ba2
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -37,6 +37,7 @@
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2022 Samuel Culpepper <sculpepper@newstore.com>
;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@ -1156,48 +1157,57 @@ (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" = (,(string-append
#$(this-package-input "python-pygobject")
"/lib/python"
#$(version-major+minor
(package-version (this-package-input "python")))
"/site-packages")))))))))
(native-inputs
(list `(,glib "bin") gobject-introspection pkg-config python vala))
(list `(,glib "bin")
pkg-config
python
python-argparse-manpage
python-dbusmock
python-shtab
umockdev))
(inputs
(list bash-minimal ;for 'wrap-program'
dbus
dbus-glib
(list bash-minimal ;for 'wrap-program'
bash-completion
libgudev
glib polkit
glib
polkit
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