guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.
commit 421038afd216e699faf76ec9a8e67a0d9c54ef33
Author: Noé Lopez <[email protected]>
AuthorDate: Mon May 11 14:40:12 2026 +0200
build: glib-or-gtk: Find gdk-pixbuf loaders correctly.
The current approach to finding the loaders depends on an implicit naming
assumption. However it differs from what is actually used by gdk-pixbuf.
The correct approach is to take all module (.so) files in the loaders
directory (not in the whole input) as is done in gdk-pixbuf-query-loaders:
<https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/blob/361cfd5e235af26a32e4b4015606ae3dbe1d952f/gdk-pixbuf/queryloaders.c#L449>.
See also: <https://codeberg.org/guix/guix/pulls/8212#issuecomment-14661621>.
* guix/build/glib-or-gtk-build-system.scm
(%gdk-pixbuf-loaders-directory): New variable.
(generate-gdk-pixbuf-loaders-cache): Change logic to find loaders.
Reviewed-By: Maxim Cournoyer <[email protected]>
Reviewed-By: Liliana Marie Prikler <[email protected]>
Signed-off-by: Noé Lopez <[email protected]>
Merges: guix/guix!8545
Change-Id: Idb9023775ac47019c93b291286f3c67f09b82857
---
guix/build/glib-or-gtk-build-system.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/guix/build/glib-or-gtk-build-system.scm
b/guix/build/glib-or-gtk-build-system.scm
index ca5c9a04c8..b8170d56e8 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -207,6 +207,8 @@ if needed."
;; `generate-gdk-pixbuf-loaders-cache' build phase defined below.
(define %gdk-pixbuf-loaders-cache-file
"lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")
+(define %gdk-pixbuf-loaders-directory
+ "lib/gdk-pixbuf-2.0/2.10.0/loaders")
(define (generate-gdk-pixbuf-loaders-cache directories outputs)
"Generate the loaders.cache file used by gdk-pixbuf to locate the available
@@ -214,8 +216,9 @@ loaders among DIRECTORIES, and set the
GDK_PIXBUF_MODULE_FILE environment
variable. The cache file is installed under OUTPUTS. Return the first cache
file name if one was created else #f."
(let* ((loaders (append-map
- (cut find-files <> "^libpixbufloader-.*\\.so$")
- (delete-duplicates directories)))
+ (lambda (dir)
+ (find-files (in-vicinity dir
%gdk-pixbuf-loaders-directory) "^.*.so$"))
+ directories))
(outputs* (map (cut string-append <> "/"
%gdk-pixbuf-loaders-cache-file)
outputs))