From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] profiles: Generate GHC's package database cache. Date: Mon, 06 Apr 2015 04:24:12 -0400 Message-ID: <87pp7hzmtv.fsf@netris.org> References: <87pp7j40aw.fsf@netris.org> <87h9su4934.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yf2Jv-0000NY-Kl for guix-devel@gnu.org; Mon, 06 Apr 2015 04:23:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yf2Js-0007RY-Dc for guix-devel@gnu.org; Mon, 06 Apr 2015 04:23:47 -0400 Received: from world.peace.net ([50.252.239.5]:58300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yf2Js-0007RO-9z for guix-devel@gnu.org; Mon, 06 Apr 2015 04:23:44 -0400 In-Reply-To: (Federico Beffa's message of "Mon, 6 Apr 2015 10:18:24 +0200") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Federico Beffa Cc: Guix-devel Federico Beffa writes: > On Sun, Apr 5, 2015 at 10:33 PM, Federico Beffa wrote: >> On Sun, Apr 5, 2015 at 10:24 PM, Mark H Weaver wrote: >>>> >>>> ;; Don't depend on GHC when there's nothing to do. >>>> (if (any (cut string-prefix? "ghc" <>) >>>> (map manifest-entry-name (manifest-entries manifest))) >>>> (gexp->derivation "ghc-package-cache" build >>>> #:modules '((guix build utils)) >>>> #:local-build? #t) >>>> (gexp->derivation "ghc-package-cache" #~(mkdir #$output)))) >>> >>> Sure, this would be fine, although I wonder if we could replace the >>> 'string-prefix?' with 'string=?'. If so, the conditional could be >> >> I used 'string-prefix?' to catch any GHC library (that we are >> prefixing with 'ghc-...'). However, to compile such a library we need >> GHC, so I think that 'string=?' should do. > > > Thinking again about this: In principle a user can install a 'ghc-...' > library without having GHC in his profile. I'm not sure how practical > this would be, but I don't see a good reason to not support this by > not creating the cache. For this reason I would prefer to keep the > '(any ...)' variant. Is the package database cache used by anything other than GHC? If the user doesn't have GHC installed, what would consult the GHC package database cache? Mark