GNU bug report logs -
#51428
core-updates-frozen-batched-changes built and ready to merge
Previous Next
Full log
Message #56 received at 51428 <at> debbugs.gnu.org (full text, mbox):
This paves the way toward properly fixing https://issues.guix.gnu.org/50957.
* guix/profiles.scm (gdk-pixbuf-loaders-cache-file): Add procedure...
(%default-profile-hooks): ... and register it as a profile hook.
---
guix/profiles.scm | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 9494684228..bdc0d52626 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2016 Chris Marusich <cmmarusich <at> gmail.com>
;;; Copyright © 2017 Huang Ying <huang.ying.caritas <at> gmail.com>
-;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2017, 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
;;; Copyright © 2019 Kyle Meyer <kyle <at> kyleam.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com>
;;; Copyright © 2020 Danny Milosavljevic <dannym <at> scratchpost.org>
@@ -1161,6 +1161,32 @@ (define build
`((type . profile-hook)
(hook . emacs-subdirs))))
+(define (gdk-pixbuf-loaders-cache-file manifest)
+ "Return a derivation that produces a loaders cache file for every gdk-pixbuf
+loaders discovered in MANIFEST."
+ (define gdk-pixbuf ;lazy reference
+ (module-ref (resolve-interface '(gnu packages gtk)) 'gdk-pixbuf))
+
+ (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package
+ manifest "gdk-pixbuf"))
+ (gdk-pixbuf-bin -> (file-append gdk-pixbuf "/bin")))
+ (define build
+ (with-imported-modules (source-module-closure
+ '((guix build glib-or-gtk-build-system)))
+ #~(begin
+ (use-modules (guix build glib-or-gtk-build-system))
+ (setenv "PATH" (string-append #$gdk-pixbuf-bin ":" (getenv "PATH")))
+ (generate-gdk-pixbuf-loaders-cache '#$(manifest-inputs manifest)
+ (list #$output)))))
+ (if %gdk-pixbuf
+ (gexp->derivation "gdk-pixbuf-loaders-cache-file" build
+ #:local-build? #t
+ #:substitutable? #f
+ #:properties
+ '((type . profile-hook)
+ (hook . gdk-pixbuf-loaders-cache-file)))
+ (return #f))))
+
(define (glib-schemas manifest)
"Return a derivation that unions all schemas from manifest entries and
creates the Glib 'gschemas.compiled' file."
@@ -1672,6 +1698,7 @@ (define %default-profile-hooks
ghc-package-cache-file
ca-certificate-bundle
emacs-subdirs
+ gdk-pixbuf-loaders-cache-file
glib-schemas
gtk-icon-themes
gtk-im-modules
--
2.33.1
This bug report was last modified 3 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.