mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 06:42:14 -05:00
profiles: gtk-icon-themes: Use 'gtk-update-icon-cache' from 'gtk+:bin'.
This is a followup to commit 7b808d7
.
* guix/profiles.scm (gtk-icon-themes): Use 'gtk-update-icon-cache' from
the "bin" output of gtk+ package.
This commit is contained in:
parent
7b808d76d6
commit
d1fb4af6b8
1 changed files with 15 additions and 6 deletions
|
@ -642,7 +642,18 @@ (define (dump file port)
|
||||||
(define (gtk-icon-themes manifest)
|
(define (gtk-icon-themes manifest)
|
||||||
"Return a derivation that unions all icon themes from manifest entries and
|
"Return a derivation that unions all icon themes from manifest entries and
|
||||||
creates the GTK+ 'icon-theme.cache' file for each theme."
|
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
|
(define build
|
||||||
(with-imported-modules '((guix build utils)
|
(with-imported-modules '((guix build utils)
|
||||||
(guix build union)
|
(guix build union)
|
||||||
|
@ -659,9 +670,7 @@ (define build
|
||||||
(let* ((destdir (string-append #$output "/share/icons"))
|
(let* ((destdir (string-append #$output "/share/icons"))
|
||||||
(icondirs (filter file-exists?
|
(icondirs (filter file-exists?
|
||||||
(map (cut string-append <> "/share/icons")
|
(map (cut string-append <> "/share/icons")
|
||||||
'#$(manifest-inputs manifest))))
|
'#$(manifest-inputs manifest)))))
|
||||||
(update-icon-cache (string-append
|
|
||||||
#+gtk+ "/bin/gtk-update-icon-cache")))
|
|
||||||
|
|
||||||
;; Union all the icons.
|
;; Union all the icons.
|
||||||
(mkdir-p (string-append #$output "/share"))
|
(mkdir-p (string-append #$output "/share"))
|
||||||
|
@ -676,11 +685,11 @@ (define build
|
||||||
;; "abiword_48.png". Ignore these.
|
;; "abiword_48.png". Ignore these.
|
||||||
(when (file-is-directory? dir)
|
(when (file-is-directory? dir)
|
||||||
(ensure-writable-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 <> '("." "..")))))))))
|
(scandir destdir (negate (cut member <> '("." "..")))))))))
|
||||||
|
|
||||||
;; Don't run the hook when there's nothing to do.
|
;; Don't run the hook when there's nothing to do.
|
||||||
(if gtk+
|
(if %gtk+
|
||||||
(gexp->derivation "gtk-icon-themes" build
|
(gexp->derivation "gtk-icon-themes" build
|
||||||
#:local-build? #t
|
#:local-build? #t
|
||||||
#:substitutable? #f)
|
#:substitutable? #f)
|
||||||
|
|
Loading…
Reference in a new issue