summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorFederico Beffa <beffa@fbengineering.ch>2014-11-04 18:16:12 +0100
committerFederico Beffa <beffa@fbengineering.ch>2014-11-04 18:16:12 +0100
commitcd14b5e3f3a186512c80da5e750c8726add706cc (patch)
treeab089f4959652ce971bdab4c525d40b6abbede21 /gnu
parentff0a8c590d0f377824aadcc06424ee285086ff5f (diff)
downloadguix-cd14b5e3f3a186512c80da5e750c8726add706cc.tar.gz
gnu: librsvg: Generate complete loaders.cache including support for SVG.
* gnu/packages/gnome.scm (librsvg): Add 'generate-full-cache phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gnome.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index ac10a8ff78..6b458c6400 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -610,7 +610,21 @@ dealing with different structured file formats.")
             ;; Likewise, create a separate 'loaders.cache' file.
             (("gdk_pixbuf_cache_file = .*$")
              "gdk_pixbuf_cache_file = $(gdk_pixbuf_moduledir).cache\n")))
-        %standard-phases)))
+        (alist-cons-after
+         'install 'generate-full-cache
+         (lambda* (#:key inputs outputs #:allow-other-keys)
+           (let ((loaders-directory 
+                  (string-append (assoc-ref outputs "out")
+                                 "/lib/gdk-pixbuf-2.0/2.0.10/loaders")))
+             (zero?
+              (system 
+               (string-append 
+                "gdk-pixbuf-query-loaders " 
+                loaders-directory "/libpixbufloader-svg.so "
+                (string-join (find-files (assoc-ref inputs "gdk-pixbuf") 
+                                         "libpixbufloader-.*\\.so") " ")
+                "> " loaders-directory ".cache")))))
+         %standard-phases))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("glib" ,glib "bin")                               ; glib-mkenums, etc.