[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
138/203: profiles: Add a gdk-pixbuf-loaders-cache-file hook.
From: |
guix-commits |
Subject: |
138/203: profiles: Add a gdk-pixbuf-loaders-cache-file hook. |
Date: |
Wed, 3 Nov 2021 21:10:23 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit e4bc7ccb63798b9ea9dd81d36fa4fc865fc2dc14
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Oct 2 21:28:24 2021 -0400
profiles: Add a gdk-pixbuf-loaders-cache-file hook.
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/status.scm (hook-message): Register it here too.
---
guix/profiles.scm | 29 ++++++++++++++++++++++++++++-
guix/status.scm | 2 ++
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index aad23c0..b628378 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
-;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
@@ -1180,6 +1180,32 @@ MANIFEST. Single-file bundles are required by programs
such as Git and Lynx."
`((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."
@@ -1691,6 +1717,7 @@ the entries in MANIFEST."
ghc-package-cache-file
ca-certificate-bundle
emacs-subdirs
+ gdk-pixbuf-loaders-cache-file
glib-schemas
gtk-icon-themes
gtk-im-modules
diff --git a/guix/status.scm b/guix/status.scm
index f351a56..eefe183 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -381,6 +381,8 @@ the current build phase."
(G_ "building CA certificate bundle..."))
('emacs-subdirs
(G_ "listing Emacs sub-directories..."))
+ ('gdk-pixbuf-loaders-cache-file
+ (G_ "generating GdkPixbuf loaders cache..."))
('glib-schemas
(G_ "generating GLib schema cache..."))
('gtk-icon-themes
- 42/203: gnu: gst-plugins-good: Update to 1.19.2., (continued)
- 42/203: gnu: gst-plugins-good: Update to 1.19.2., guix-commits, 2021/11/03
- 38/203: gnu: python-sphinx: Update to 4.2.0., guix-commits, 2021/11/03
- 43/203: gnu: zxing-cpp: Update to 1.2.0., guix-commits, 2021/11/03
- 45/203: gnu: gst-plugins-ugly: Update to 1.19.2., guix-commits, 2021/11/03
- 49/203: gnu: e2fsprogs: Update to 1.46.4., guix-commits, 2021/11/03
- 51/203: gnu: pulseaudio: Update to 15.0., guix-commits, 2021/11/03
- 124/203: gnu: libthai: Make datrie a normal native-input., guix-commits, 2021/11/03
- 130/203: gnu: webkitgtk: Use libsoup 3 and build with GCC., guix-commits, 2021/11/03
- 133/203: gnu: python-flit: Update to 3.3.0., guix-commits, 2021/11/03
- 146/203: gnu: nspr: Normalize inputs., guix-commits, 2021/11/03
- 138/203: profiles: Add a gdk-pixbuf-loaders-cache-file hook.,
guix-commits <=
- 154/203: gnu: python-dbusmock: Update to 0.24.0., guix-commits, 2021/11/03
- 149/203: gnu: meson: Update to 0.60.0., guix-commits, 2021/11/03
- 158/203: gnu: gdk-pixbuf: Remove obsolete jasper support., guix-commits, 2021/11/03
- 163/203: gnu: python-numpy: Update to 1.21.3 and cleanup., guix-commits, 2021/11/03
- 164/203: gnu: gdb: Update to 11.1 and remove gdb-9.2., guix-commits, 2021/11/03
- 165/203: gnu: ldc: Update to 1.27.1., guix-commits, 2021/11/03
- 166/203: gnu: python2-lit: Remove package., guix-commits, 2021/11/03
- 167/203: gnu: python-lit: Update to 12.0.1., guix-commits, 2021/11/03
- 169/203: gnu: Add meson-0.59., guix-commits, 2021/11/03
- 181/203: gnu: accountsservice: Use meson 0.59.4 to work around a bug in 0.60.0., guix-commits, 2021/11/03