From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH 2/5] profiles: gtk-icon-themes: Use 'gtk-update-icon-cache' from 'gtk+:bin'. Date: Sat, 20 Aug 2016 10:43:17 +0800 Message-ID: <87wpjcyxbu.fsf@member.fsf.org> References: <20160806104616.13089-1-iyzsong@gmail.com> <20160806104616.13089-2-iyzsong@gmail.com> <874m6hut44.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bawFr-00026U-6q for guix-devel@gnu.org; Fri, 19 Aug 2016 22:43:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bawFm-0005aQ-76 for guix-devel@gnu.org; Fri, 19 Aug 2016 22:43:27 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:50528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bawFm-0005aF-1D for guix-devel@gnu.org; Fri, 19 Aug 2016 22:43:22 -0400 In-Reply-To: <874m6hut44.fsf@netris.org> (Mark H. Weaver's message of "Fri, 19 Aug 2016 03:15:39 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver writes: > =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > >> * guix/profiles.scm (gtk-icon-themes): Use 'gtk-update-icon-cacnhe' from >> the "bin" output of gtk+ package. >> --- >> guix/profiles.scm | 21 +++++++++++++++------ >> 1 file changed, 15 insertions(+), 6 deletions(-) >> >> diff --git a/guix/profiles.scm b/guix/profiles.scm >> index db807a8..9c2dbba 100644 >> --- a/guix/profiles.scm >> +++ b/guix/profiles.scm >> @@ -642,7 +642,18 @@ MANIFEST. Single-file bundles are required by prog= rams such as Git and Lynx." >> (define (gtk-icon-themes manifest) >> "Return a derivation that unions all icon themes from manifest entrie= s 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 correspon= ding >> + ;; 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"= ))) > > Hmm. Would this cause 'gtk+' to become a dependency for building any > profile, even if it contains no graphical programs? No, it does only run when the profile contains gtk+ (with or without this patch). But with this patch, it will use the latest deployed gtk+:bin instead of the gtk+ referenced by the profile.