gnu: epiphany: Fix dbus startup failure.

* gnu/packages/gnome.scm (epiphany)[arguments]: Create a union of all
directories in XDG_DATA_DIRS to avoid overwhelming dbus-daemon.

Change-Id: Iac1084832d0fe82c9d41a409a450bd9f2f0f7b93
This commit is contained in:
Ricardo Wurmus 2024-07-22 11:25:37 +02:00 committed by Ludovic Courtès
parent e885edc0df
commit 4f13ad4aa4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -7226,6 +7226,11 @@ (define-public epiphany
(arguments
(list
#:glib-or-gtk? #t
#:modules '((guix build meson-build-system)
(guix build utils)
(guix build union))
#:imported-modules `((guix build union)
,@%meson-build-system-modules)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
@ -7255,8 +7260,9 @@ (define-public epiphany
", ")
"],")))))
(replace 'check
(lambda* (#:key parallel-tests? tests? #:allow-other-keys)
(lambda* (#:key inputs parallel-tests? tests? #:allow-other-keys)
(when tests?
;(setenv "GALLIUM_DRIVER" "llvmpipe")
(setenv "XDG_RUNTIME_DIR" (string-append (getcwd)
"/runtime-dir"))
(mkdir (getenv "XDG_RUNTIME_DIR"))
@ -7266,6 +7272,13 @@ (define-public epiphany
(number->string (parallel-job-count))
"1"))
(setenv "XDG_CACHE_HOME" (getcwd))
;; There are too many directories in XDG_DATA_DIRS, so
;; dbus-daemon fails to start. We work around this by
;; creating a single union directory of all these directories.
(setenv "XDG_DATA_DIRS" "/tmp/share")
(union-build "/tmp/share"
(search-path-as-list '("share") (map cdr inputs))
#:create-all-directories? #t)
;; Tests require a running X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")