[4/5] gnu: gnome-icon-theme, adwaita-icon-theme: Don't install 'icon-theme.cache'.

Message ID 20160806104616.13089-4-iyzsong@gmail.com
State New
Headers

Commit Message

宋文武 Aug. 6, 2016, 10:46 a.m. UTC
  * gnu/packages/gnome.scm (gnome-icon-theme)[native-inputs]: Remove 'gtk+'.
[arguments]: Set 'GTK_UPDATE_ICON_CACHE' to the path of 'true'.
(adwaita-icon-theme)[native-inputs]: Add 'gtk+:bin'.
---
 gnu/packages/gnome.scm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
  

Comments

Leo Famulari Aug. 14, 2016, 2:15 a.m. UTC | #1
On Sat, Aug 06, 2016 at 06:46:15PM +0800, 宋文武 wrote:
> * gnu/packages/gnome.scm (gnome-icon-theme)[native-inputs]: Remove 'gtk+'.
> [arguments]: Set 'GTK_UPDATE_ICON_CACHE' to the path of 'true'.
> (adwaita-icon-theme)[native-inputs]: Add 'gtk+:bin'.

Would this patch get rid of the icon-theme cache conflicts that most
Guix users see whenever they do `guix package`?
  
=?utf-8?B?5a6L5paH5q2m?= Aug. 14, 2016, 6:23 a.m. UTC | #2
Leo Famulari <leo@famulari.name> writes:

> On Sat, Aug 06, 2016 at 06:46:15PM +0800, 宋文武 wrote:
>> * gnu/packages/gnome.scm (gnome-icon-theme)[native-inputs]: Remove 'gtk+'.
>> [arguments]: Set 'GTK_UPDATE_ICON_CACHE' to the path of 'true'.
>> (adwaita-icon-theme)[native-inputs]: Add 'gtk+:bin'.
>
> Would this patch get rid of the icon-theme cache conflicts that most
> Guix users see whenever they do `guix package`?

Yes, that's the plan :-)
  

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8be68ab..78827eb 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -645,9 +645,14 @@  update-desktop-database: updates the database containing a cache of MIME types
        (base32
         "0fjh9qmmgj34zlgxb09231ld7khys562qxbpsjlaplq2j85p57im"))))
     (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags
+       ;; Don't create 'icon-theme.cache'.
+       (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
+              (true      (string-append coreutils "/bin/true")))
+         (list (string-append "GTK_UPDATE_ICON_CACHE=" true)))))
     (native-inputs
-     `(("gtk+" ,gtk+) ; for gtk-update-icon-cache
-       ("icon-naming-utils" ,icon-naming-utils)
+     `(("icon-naming-utils" ,icon-naming-utils)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
     (home-page "http://art.gnome.org/")
@@ -669,7 +674,9 @@  update-desktop-database: updates the database containing a cache of MIME types
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0ddfwwqx8s63qbqimmbb015lqsab4s0rvy1j81jdsh7k95rqh2ks"))))))
+                "0ddfwwqx8s63qbqimmbb015lqsab4s0rvy1j81jdsh7k95rqh2ks"))))
+    (native-inputs
+     `(("gtk-encode-symbolic-svg" ,gtk+ "bin")))))
 
 (define-public shared-mime-info
   (package