Subject: [bug#77735] [PATCH] gnu: flatpak: Fix "No GSettings schemas are installed on the system".

From: Ludovic Courtès <[email-masked]>
Date: Wed, 16 Apr 2025 17:31:33 +0200

Rostislav Svoboda <[email-masked]> writes:

> * 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

[...]

> +  (let ((release "1.16.0")
> +        (revision "1"))
> +    (package
> +      (name "flatpak")
> +      (version (string-append release "-" revision))

That’s not something we do; just keep the ‘version’ field unchanged.

> +            (add-after 'install 'wrap-flatpak
> +              (lambda* (#:key inputs #:allow-other-keys)
> +                (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" =

Should it be ‘prefix’ instead of ‘=’?

Apart from that it LGTM, thanks!

Ludo’.