gnu: gnome-control-center: Update to 44.3.

Some previous fixes have been merged upstream. The gnome version is now read
from a dbus service, and passwd is already searched in /run/setuid-programs.

In order to let the tests run, we use the same tests environment as
gnome-shell.

* gnu/packages/gnome.scm (gnome-control-center): Update to 44.3. Apply
gnome-control-center-firmware-security.patch.
[#:phases]<patch-paths>: Adjust accordingly.
<skip-gtk-update-icon-cache>: Adjust accordingly.
<check>: Override the check phase to run under dbus.
[native-inputs]: Add setxkbmap.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Vivien Kraus 2023-09-11 23:26:20 +02:00 committed by Liliana Marie Prikler
parent 3066ad29cc
commit d6462be6a8
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -9032,7 +9032,7 @@ (define-public gnome-bluetooth
(define-public gnome-control-center
(package
(name "gnome-control-center")
(version "42.4")
(version "44.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@ -9040,7 +9040,10 @@ (define-public gnome-control-center
name "-" version ".tar.xz"))
(sha256
(base32
"1ln5rch6zbfh3vl2nnnmw39bylgg38rin6xp7ra0ra4ay3wv3gvs"))))
"0yhcm0c0ghkfqswqlkwcln3jpaz6jzvqaph2c3lgmv635w2nash6"))
(patches
(search-patches
"gnome-control-center-firmware-security.patch"))))
(build-system meson-build-system)
(arguments
(list
@ -9064,19 +9067,32 @@ (define-public gnome-control-center
"panels/network/connection-editor/net-connection-editor.c")
(("\"nm-connection-editor")
(string-append "\"" (search-input-file
inputs "bin/nm-connection-editor"))))
(substitute* "panels/user-accounts/run-passwd.c"
(("/usr/bin/passwd")
"/run/setuid-programs/passwd"))
(substitute* "panels/info-overview/cc-info-overview-panel.c"
(("DATADIR \"/gnome/gnome-version.xml\"")
(format #f "~s" (search-input-file
inputs "share/gnome/gnome-version.xml"))))))
inputs "bin/nm-connection-editor"))))))
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "build-aux/meson/meson_post_install.py"
(("gtk-update-icon-cache") (which "true"))))))))
(substitute* "meson.build"
(("gtk_update_icon_cache: true")
"gtk_update_icon_cache: false"))))
(replace 'check
(lambda* (#:key parallel-tests? tests? #:allow-other-keys)
(when tests?
;; Tests require a running X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
;; For the missing /var/lib/dbus/machine-id
(setenv "DBUS_FATAL_WARNINGS" "0")
(setenv "NO_AT_BRIDGE" "1")
(setenv "HOME" "/tmp")
(setenv "XDG_RUNTIME_DIR" (string-append (getcwd) "/runtime-dir"))
(mkdir (getenv "XDG_RUNTIME_DIR"))
(chmod (getenv "XDG_RUNTIME_DIR") #o700)
(setenv "MESON_TESTTHREADS"
(if parallel-tests?
(number->string (parallel-job-count))
"1"))
(invoke "dbus-run-session" "--"
"meson" "test" "-t" "0")))))))
(native-inputs
(list docbook-xsl
gettext-minimal
@ -9085,7 +9101,8 @@ (define-public gnome-control-center
pkg-config
python
python-dbusmock
xorg-server-for-tests))
xorg-server-for-tests
setxkbmap))
(inputs
(list accountsservice
colord-gtk