civodul pushed a commit to branch master
in repository guix.

commit d14663b94a7428eccbfa27aa620dc3d8ba67d752
Author: Rostislav Svoboda <[email protected]>
AuthorDate: Tue Apr 8 13:48:41 2025 +0200

    gnu: flatpak: Fix "No GSettings schemas are installed on the system".
    
    * gnu/packages/package-management.scm (flatpak)[inputs]: Add
    gsettings-desktop-schemas.
    <#:phases>: Set GSETTINGS_SCHEMA_DIR in wrap-phase.
    
    This fixes an error that appeared when running system-wide Flatpak
    operations such as 'sudo flatpak update':
    
      GLib-GIO-ERROR [...] No GSettings schemas are installed on the system
    
    The missing schemas from gsettings-desktop-schemas prevented proper GLib
    configuration lookups (e.g., org.gnome.system.proxy). By setting
    GSETTINGS_SCHEMA_DIR to point to gsettings-desktop-schemas' schema 
directory,
    we ensure Flatpak can access required GLib configuration templates.
    
    Change-Id: I9522c07b6c8ccf20a86ee966effb73eb61a2abc7
    Signed-off-by: Ludovic Courtès <[email protected]>
---
 gnu/packages/package-management.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/package-management.scm 
b/gnu/packages/package-management.scm
index 929b928b10..e6a616fe00 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -2117,6 +2117,12 @@ cp -r /tmp/locale/*/en_US.*")))
               (let ((flatpak (string-append #$output "/bin/flatpak"))
                     (glib-networking (assoc-ref inputs "glib-networking")))
                 (wrap-program flatpak
+                  ;; Prevent error:
+                  ;; "No GSettings schemas are installed on the system"
+                  `("GSETTINGS_SCHEMA_DIR" =
+                    (,(string-append
+                       #$(this-package-input "gsettings-desktop-schemas")
+                       "/share/glib-2.0/schemas")))
                   ;; Allow GIO to find TLS backend.
                   `("GIO_EXTRA_MODULES" prefix
                     (,(string-append glib-networking 
"/lib/gio/modules"))))))))))
@@ -2141,6 +2147,7 @@ cp -r /tmp/locale/*/en_US.*")))
            bubblewrap
            curl
            fuse
+           gsettings-desktop-schemas
            gdk-pixbuf
            libcap
            libostree

Reply via email to