guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.

commit 0cf0b65e7c0bd8795639c08681f4d8405737c18e
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Fri Sep 26 20:00:37 2025 +0200

    gnu: Add muffin.
    
    * gnu/packages/cinnamon.scm (muffin): New variable.
---
 gnu/packages/cinnamon.scm | 195 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 195 insertions(+)

diff --git a/gnu/packages/cinnamon.scm b/gnu/packages/cinnamon.scm
index cd2d88975f..51343dc5d4 100644
--- a/gnu/packages/cinnamon.scm
+++ b/gnu/packages/cinnamon.scm
@@ -41,11 +41,13 @@
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages iso-codes)
+  #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages photo)
@@ -55,6 +57,8 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages wm)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
@@ -321,6 +325,197 @@ as well as some desktop-wide documents.")
     (license (list license:gpl2+ license:lgpl2.0+
                    license:expat)))) ;display-name.c , edid-parse.c
 
+(define-public muffin
+  (package
+    (name "muffin")
+    (version "6.4.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/linuxmint/muffin";)
+                     (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1ndyx4dk9nq2dysrzw45np609k782hhdcqiz3w091njchvj8xa3s"))))
+    (build-system meson-build-system)
+    (arguments
+     (list
+      #:modules '((guix build meson-build-system)
+                  (guix build utils)
+                  (ice-9 match))
+      #:glib-or-gtk? #t
+      #:configure-flags
+      #~(list
+         ;; Otherwise, the RUNPATH will lack the final path component.
+         (string-append "-Dc_link_args=-Wl,-rpath="
+                        #$output "/lib,-rpath="
+                        #$output "/lib/muffin")
+         ;; Don't install tests.
+         "-Dinstalled_tests=false"
+         ;; The following flags are needed for the bundled clutter
+         (string-append "-Dxwayland_path="
+                        (search-input-file %build-inputs "bin/Xwayland"))
+         ;; the remaining flags are needed for the bundled cogl
+         (string-append "-Dopengl_libname="
+                        (search-input-file %build-inputs "lib/libGL.so"))
+         (string-append "-Dgles2_libname="
+                        (search-input-file %build-inputs "lib/libGLESv2.so"))
+         "-Degl_device=true"            ;false by default
+         "-Dwayland_eglstream=true"     ;false by default
+         )
+      #:test-options #~(list "--verbose")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-SOURCE_DIR
+            (lambda _
+              ;; Just to make our life easier later.
+              (setenv "SOURCE_DIR" (getcwd))))
+          (add-after 'unpack 'use-RUNPATH-instead-of-RPATH
+            (lambda _
+              ;; The build system disables RUNPATH in favor of RPATH to work
+              ;; around a peculiarity of their CI system.  Ignore that.
+              (substitute* "meson.build"
+                (("disable-new-dtags")
+                 "enable-new-dtags"))))
+          (add-after 'unpack 'patch-dlopen-calls
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "src/wayland/meta-wayland-egl-stream.c"
+                (("libnvidia-egl-wayland.so.1")
+                 (search-input-file inputs 
"lib/libnvidia-egl-wayland.so.1")))))
+          (add-before 'configure 'set-udev-dir
+            (lambda _
+              (setenv "PKG_CONFIG_UDEV_UDEVDIR"
+                      (string-append #$output "/lib/udev"))))
+          (add-after 'unpack 'disable-problematic-tests
+            (lambda _
+              (with-directory-excursion "src/tests"
+                (substitute* "meson.build"
+                  ;; The 'sync' variant of the X11 test fails for unknown 
reason
+                  ;; (see: 
https://gitlab.gnome.org/GNOME/mutter/-/issues/3910).
+                  (("foreach mode: \\['', 'sync'\\]")
+                   "foreach mode: []")
+                  ;; Many (all?) stacking tests are susceptible to fail
+                  ;; non-deterministically under high load (see:
+                  ;; https://gitlab.gnome.org/GNOME/mutter/-/issues/4035).
+                  (("foreach stacking_test: stacking_tests")
+                   "foreach stacking_test: []"))
+                (substitute* "clutter/conform/meson.build"
+                  ;; TODO: Re-instate the gesture test in a 47+ release.
+                  ;; The conform/gesture test fails non-deterministically on
+                  ;; some machines (see:
+                  ;; 
https://gitlab.gnome.org/GNOME/mutter/-/issues/3521#note_2385427).
+                  ((".*'gesture',.*") "")
+
+                  ;; The 'event-delivery' test fails non-deterministically
+                  ;; (see:
+                  ;; 
https://gitlab.gnome.org/GNOME/mutter/-/issues/4035#note_2402672).
+                  ((".*'event-delivery',.*") "")))))
+          (replace 'check
+            (lambda* (#:key tests? test-options parallel-tests?
+                      #:allow-other-keys)
+              (when tests?
+                ;; Setup (refer to the 'test-mutter' and its dependents targets
+                ;; in the '.gitlab-ci.yml' file.
+                (setenv "HOME" "/tmp")
+                (setenv "XDG_RUNTIME_DIR" (string-append (getcwd)
+                                                         "/runtime-dir"))
+                (mkdir (getenv "XDG_RUNTIME_DIR"))
+                (chmod (getenv "XDG_RUNTIME_DIR") #o700)
+
+                (setenv "GSETTINGS_SCHEMA_DIR" "data")
+                (setenv "MUFFIN_DEBUG_DUMMY_MODE_SPECS" "[email protected]")
+                (setenv "PIPEWIRE_DEBUG" "2")
+                (setenv "PIPEWIRE_LOG" "meson-logs/pipewire.log")
+                (setenv "XVFB_SERVER_ARGS" "+iglx -noreset")
+                (setenv "G_SLICE" "always-malloc")
+                (setenv "MALLOC_CHECK" "3")
+                (setenv "NO_AT_BRIDGE" "1")
+
+                (invoke "glib-compile-schemas" (getenv "GSETTINGS_SCHEMA_DIR"))
+                (invoke "pipewire" "--version") ;check for pipewire
+
+                (setenv "MESON_TESTTHREADS"
+                        (if parallel-tests?
+                            (number->string (parallel-job-count))
+                            "1"))
+
+                (apply invoke "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
+                       "meson" "test" "-t" "0"
+                       "--setup=plain"
+                       "--no-suite=mutter/kvm"
+                       "--no-rebuild"
+                       "--print-errorlogs"
+                       test-options)))))))
+    (native-inputs
+     (list desktop-file-utils           ;for update-desktop-database
+           `(,glib "bin")               ;for glib-compile-schemas, etc.
+           gettext-minimal
+           gobject-introspection
+           pkg-config
+           xvfb-run
+           wayland-protocols
+           ;; For tests.
+           ;; Warnings are configured to be fatal during the tests; add an icon
+           ;; theme to please libxcursor.
+           adwaita-icon-theme
+           libei
+           libxcursor                   ;for XCURSOR_PATH
+           pipewire
+           python
+           python-dbus
+           python-dbusmock
+           wireplumber-minimal))
+    (propagated-inputs
+     (list gsettings-desktop-schemas
+           at-spi2-core
+           cairo
+           eudev
+           gdk-pixbuf
+           glib
+           gtk+
+           graphene
+           json-glib
+           libinput
+           libx11
+           libxcomposite
+           libxcvt
+           libxdamage
+           libxext
+           libxfixes
+           libxkbcommon
+           libxml2
+           libxrandr
+           mesa
+           pango
+           xinput))
+    (inputs
+     (list colord
+           egl-wayland                  ;for wayland-eglstream-protocols
+           elogind
+           cinnamon-desktop
+           libcanberra
+           libdisplay-info
+           libgudev
+           libice
+           libsm
+           libwacom
+           libxkbfile
+           libxrandr
+           libxtst
+           pipewire
+           startup-notification
+           sysprof
+           upower
+           xkeyboard-config
+           xorg-server-xwayland))
+    (home-page "https://github.com/linuxmint/muffin";)
+    (synopsis "Window and compositing manager")
+    (description
+     "Muffin is a  fork of Mutter, specifically adapted to work as the
+window manager for the Cinnamon desktop environment.")
+    (license license:gpl2+)))
+
 (define-public nemo
   (package
     (name "nemo")

Reply via email to