mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-20 17:53:26 -05:00
gnu: mutter: Use G-expression.
* gnu/packages/gnome.scm (mutter)[arguments]: Use G-expressions.
This commit is contained in:
parent
6af5818262
commit
03cae37fae
1 changed files with 94 additions and 96 deletions
|
@ -7487,108 +7487,106 @@ (define-public mutter
|
||||||
;; needed here as well.
|
;; needed here as well.
|
||||||
(build-system meson-build-system)
|
(build-system meson-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:imported-modules (,@%meson-build-system-modules
|
(list
|
||||||
|
#:imported-modules `(,@%meson-build-system-modules
|
||||||
(guix build syscalls))
|
(guix build syscalls))
|
||||||
#:modules ((guix build meson-build-system)
|
#:modules '((guix build meson-build-system)
|
||||||
(guix build syscalls)
|
(guix build syscalls)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(ice-9 match))
|
(ice-9 match))
|
||||||
#:glib-or-gtk? #t
|
#:glib-or-gtk? #t
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(list
|
#~(list
|
||||||
;; Otherwise, the RUNPATH will lack the final path component.
|
;; Otherwise, the RUNPATH will lack the final path component.
|
||||||
(string-append "-Dc_link_args=-Wl,-rpath="
|
(string-append "-Dc_link_args=-Wl,-rpath="
|
||||||
(assoc-ref %outputs "out") "/lib:"
|
#$output "/lib:" #$output "/lib/mutter-9")
|
||||||
(assoc-ref %outputs "out") "/lib/mutter-9")
|
;; Disable systemd support.
|
||||||
;; Disable systemd support.
|
"-Dsystemd=false"
|
||||||
"-Dsystemd=false"
|
;; The following flags are needed for the bundled clutter
|
||||||
;; The following flags are needed for the bundled clutter
|
(string-append "-Dxwayland_path="
|
||||||
(string-append "-Dxwayland_path="
|
(search-input-file %build-inputs "/bin/Xwayland"))
|
||||||
(search-input-file %build-inputs "/bin/Xwayland"))
|
;; the remaining flags are needed for the bundled cogl
|
||||||
;; the remaining flags are needed for the bundled cogl
|
(string-append "-Dopengl_libname="
|
||||||
(string-append "-Dopengl_libname="
|
(search-input-file %build-inputs "/lib/libGL.so"))
|
||||||
(search-input-file %build-inputs "/lib/libGL.so"))
|
(string-append "-Dgles2_libname="
|
||||||
(string-append "-Dgles2_libname="
|
(search-input-file %build-inputs "/lib/libGLESv2.so"))
|
||||||
(search-input-file %build-inputs "/lib/libGLESv2.so"))
|
"-Degl_device=true" ;false by default
|
||||||
"-Degl_device=true" ;false by default
|
"-Dwayland_eglstream=true") ;false by default
|
||||||
"-Dwayland_eglstream=true") ;false by default
|
#:test-options ''("--verbose")
|
||||||
#:test-options
|
#:phases
|
||||||
(list "--verbose")
|
#~(modify-phases %standard-phases
|
||||||
#:phases
|
(add-after 'unpack 'patch-dlopen-calls
|
||||||
(modify-phases %standard-phases
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(add-after 'unpack 'patch-dlopen-calls
|
(substitute* "src/wayland/meta-wayland-egl-stream.c"
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(("libnvidia-egl-wayland.so.1")
|
||||||
(substitute* "src/wayland/meta-wayland-egl-stream.c"
|
(search-input-file inputs
|
||||||
(("libnvidia-egl-wayland.so.1")
|
"/lib/libnvidia-egl-wayland.so.1")))))
|
||||||
(search-input-file inputs
|
(add-before 'configure 'set-udev-dir
|
||||||
"/lib/libnvidia-egl-wayland.so.1")))))
|
(lambda _
|
||||||
(add-before 'configure 'set-udev-dir
|
(setenv "PKG_CONFIG_UDEV_UDEVDIR"
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(string-append #$output "/lib/udev"))))
|
||||||
(setenv "PKG_CONFIG_UDEV_UDEVDIR"
|
(add-after 'unpack 'disable-problematic-tests
|
||||||
(string-append (assoc-ref outputs "out")
|
(lambda _
|
||||||
"/lib/udev"))))
|
;; The native-headless test hangs due to attempting to use audio,
|
||||||
(add-after 'unpack 'disable-problematic-tests
|
;; unavailable in the container.
|
||||||
(lambda _
|
;; Note: the following sed expression deletes the whole test(...)
|
||||||
;; The native-headless test hangs due to attempting to use audio,
|
;; expression paragraph. For an explanation, see: info '(sed)
|
||||||
;; unavailable in the container.
|
;; Multiline techniques'.
|
||||||
;; Note: the following sed expression deletes the whole test(...)
|
(invoke "sed" "/./{H;$!d} ; x ; s/^.*native-headless.*$//"
|
||||||
;; expression paragraph. For an explanation, see: info '(sed)
|
"-i" "src/tests/meson.build")
|
||||||
;; Multiline techniques'.
|
;; Timeline tests may unexpectedly fail on missed frames, so
|
||||||
(invoke "sed" "/./{H;$!d} ; x ; s/^.*native-headless.*$//"
|
;; let's disable them as well.
|
||||||
"-i" "src/tests/meson.build")
|
;; See <https://gitlab.gnome.org/GNOME/mutter/-/issues/2125>
|
||||||
;; Timeline tests may unexpectedly fail on missed frames, so
|
(substitute* "src/tests/clutter/conform/meson.build"
|
||||||
;; let's disable them as well.
|
(("'timeline.*',") ""))))
|
||||||
;; See <https://gitlab.gnome.org/GNOME/mutter/-/issues/2125>
|
(replace 'check
|
||||||
(substitute* "src/tests/clutter/conform/meson.build"
|
(lambda* (#:key tests? test-options parallel-tests?
|
||||||
(("'timeline.*',") ""))))
|
#:allow-other-keys)
|
||||||
(replace 'check
|
(when tests?
|
||||||
(lambda* (#:key tests? test-options parallel-tests?
|
;; Setup (see the 'test-mutter' CI target at
|
||||||
#:allow-other-keys)
|
;; https://gitlab.gnome.org/GNOME/mutter/-/raw/main/.gitlab-ci.yml).
|
||||||
(when tests?
|
(setenv "XDG_RUNTIME_DIR" "runtime-dir")
|
||||||
;; Setup (see the 'test-mutter' CI target at
|
(setenv "GSETTINGS_SCHEMA_DIR" "data")
|
||||||
;; https://gitlab.gnome.org/GNOME/mutter/-/raw/main/.gitlab-ci.yml).
|
(setenv "MUTTER_DEBUG_DUMMY_MODE_SPECS" "800x600@10.0")
|
||||||
(setenv "XDG_RUNTIME_DIR" "runtime-dir")
|
(setenv "PIPEWIRE_DEBUG" "2")
|
||||||
(setenv "GSETTINGS_SCHEMA_DIR" "data")
|
(setenv "PIPEWIRE_LOG" "meson-logs/pipewire.log")
|
||||||
(setenv "MUTTER_DEBUG_DUMMY_MODE_SPECS" "800x600@10.0")
|
(setenv "XVFB_SERVER_ARGS" "+iglx -noreset")
|
||||||
(setenv "PIPEWIRE_DEBUG" "2")
|
(setenv "G_SLICE" "always-malloc")
|
||||||
(setenv "PIPEWIRE_LOG" "meson-logs/pipewire.log")
|
(setenv "MALLOC_CHECK" "3")
|
||||||
(setenv "XVFB_SERVER_ARGS" "+iglx -noreset")
|
(setenv "NO_AT_BRIDGE" "1")
|
||||||
(setenv "G_SLICE" "always-malloc")
|
;; This is needed, otherwise the "mutter:core+mutter/unit /
|
||||||
(setenv "MALLOC_CHECK" "3")
|
;; anonymous-file" test would fail (see:
|
||||||
(setenv "NO_AT_BRIDGE" "1")
|
;; https://gitlab.gnome.org/GNOME/mutter/-/issues/2017).
|
||||||
;; This is needed, otherwise the "mutter:core+mutter/unit /
|
(setenv "CI_JOB_ID" "1")
|
||||||
;; anonymous-file" test would fail (see:
|
|
||||||
;; https://gitlab.gnome.org/GNOME/mutter/-/issues/2017).
|
|
||||||
(setenv "CI_JOB_ID" "1")
|
|
||||||
|
|
||||||
(invoke "glib-compile-schemas" (getenv "GSETTINGS_SCHEMA_DIR"))
|
(invoke "glib-compile-schemas" (getenv "GSETTINGS_SCHEMA_DIR"))
|
||||||
(mkdir-p (getenv "XDG_RUNTIME_DIR"))
|
(mkdir-p (getenv "XDG_RUNTIME_DIR"))
|
||||||
(chmod (getenv "XDG_RUNTIME_DIR") #o755)
|
(chmod (getenv "XDG_RUNTIME_DIR") #o755)
|
||||||
(invoke "pipewire" "--version") ;check for pipewire
|
(invoke "pipewire" "--version") ;check for pipewire
|
||||||
(system "pipewire &") ;always returns 0 due to forking
|
(system "pipewire &") ;always returns 0 due to forking
|
||||||
|
|
||||||
(setenv "MESON_TESTTHREADS"
|
(setenv "MESON_TESTTHREADS"
|
||||||
(if parallel-tests?
|
(if parallel-tests?
|
||||||
(number->string (parallel-job-count))
|
(number->string (parallel-job-count))
|
||||||
"1"))
|
"1"))
|
||||||
(match (primitive-fork)
|
(match (primitive-fork)
|
||||||
(0 ;child process
|
(0 ;child process
|
||||||
(set-child-subreaper!)
|
(set-child-subreaper!)
|
||||||
;; Use tini so that signals are properly handled and
|
;; Use tini so that signals are properly handled and
|
||||||
;; doubly-forked processes get reaped; otherwise,
|
;; doubly-forked processes get reaped; otherwise,
|
||||||
;; python-dbusmock would waste time polling for the dbus
|
;; python-dbusmock would waste time polling for the dbus
|
||||||
;; processes it spawns to be reaped, in vain.
|
;; processes it spawns to be reaped, in vain.
|
||||||
(apply execlp "tini" "--"
|
(apply execlp "tini" "--"
|
||||||
"dbus-run-session" "--"
|
"dbus-run-session" "--"
|
||||||
"xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
|
"xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
|
||||||
"meson" "test" "-t" "0" "--print-errorlogs"
|
"meson" "test" "-t" "0" "--print-errorlogs"
|
||||||
test-options))
|
test-options))
|
||||||
(pid
|
(pid
|
||||||
(match (waitpid pid)
|
(match (waitpid pid)
|
||||||
((_ . status)
|
((_ . status)
|
||||||
(unless (zero? status)
|
(unless (zero? status)
|
||||||
(error "`meson test' exited with status"
|
(error "`meson test' exited with status"
|
||||||
status))))))))))))
|
status))))))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list desktop-file-utils ; for update-desktop-database
|
(list desktop-file-utils ; for update-desktop-database
|
||||||
`(,glib "bin") ; for glib-compile-schemas, etc.
|
`(,glib "bin") ; for glib-compile-schemas, etc.
|
||||||
|
|
Loading…
Reference in a new issue