summaryrefslogtreecommitdiff
path: root/guix/profiles.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-11-13 00:34:16 +0100
committerLudovic Courtès <ludo@gnu.org>2016-11-13 00:34:16 +0100
commit2cab1dd58b9a8fb4db8f46a0b00e1358fc0de21b (patch)
treeb0f12de9371ebbd806214df841cf3a1c116d5431 /guix/profiles.scm
parent15abcabe4e1d34416714eae66dba32ff96d05a6f (diff)
parentde7da4e5d14a1acace1a89d9c520d336eecc7e45 (diff)
downloadguix-patches-2cab1dd58b9a8fb4db8f46a0b00e1358fc0de21b.tar
guix-patches-2cab1dd58b9a8fb4db8f46a0b00e1358fc0de21b.tar.gz
Merge branch 'core-updates'
Diffstat (limited to 'guix/profiles.scm')
-rw-r--r--guix/profiles.scm21
1 files changed, 15 insertions, 6 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 33a5f50a53..b56b8f4c79 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -682,7 +682,18 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx."
(define (gtk-icon-themes manifest)
"Return a derivation that unions all icon themes from manifest entries and
creates the GTK+ 'icon-theme.cache' file for each theme."
- (mlet %store-monad ((gtk+ (manifest-lookup-package manifest "gtk+")))
+ (define gtk+ ; lazy reference
+ (module-ref (resolve-interface '(gnu packages gtk)) 'gtk+))
+
+ (mlet %store-monad ((%gtk+ (manifest-lookup-package manifest "gtk+"))
+ ;; XXX: Can't use gtk-update-icon-cache corresponding
+ ;; to the gtk+ referenced by 'manifest'. Because
+ ;; '%gtk+' can be either a package or store path, and
+ ;; there's no way to get the "bin" output for the later.
+ (gtk-update-icon-cache
+ -> #~(string-append #+gtk+:bin
+ "/bin/gtk-update-icon-cache")))
+
(define build
(with-imported-modules '((guix build utils)
(guix build union)
@@ -699,9 +710,7 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
(let* ((destdir (string-append #$output "/share/icons"))
(icondirs (filter file-exists?
(map (cut string-append <> "/share/icons")
- '#$(manifest-inputs manifest))))
- (update-icon-cache (string-append
- #+gtk+ "/bin/gtk-update-icon-cache")))
+ '#$(manifest-inputs manifest)))))
;; Union all the icons.
(mkdir-p (string-append #$output "/share"))
@@ -716,11 +725,11 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
;; "abiword_48.png". Ignore these.
(when (file-is-directory? dir)
(ensure-writable-directory dir)
- (system* update-icon-cache "-t" dir "--quiet"))))
+ (system* #+gtk-update-icon-cache "-t" dir "--quiet"))))
(scandir destdir (negate (cut member <> '("." "..")))))))))
;; Don't run the hook when there's nothing to do.
- (if gtk+
+ (if %gtk+
(gexp->derivation "gtk-icon-themes" build
#:local-build? #t
#:substitutable? #f)