From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: [PATCH] profiles: Generate GHC's package database cache. Date: Sun, 5 Apr 2015 22:33:27 +0200 Message-ID: References: <87pp7j40aw.fsf@netris.org> <87h9su4934.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YerEY-0007oQ-AP for guix-devel@gnu.org; Sun, 05 Apr 2015 16:33:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YerEX-00054v-4i for guix-devel@gnu.org; Sun, 05 Apr 2015 16:33:30 -0400 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:36703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YerEW-00054r-Te for guix-devel@gnu.org; Sun, 05 Apr 2015 16:33:29 -0400 Received: by lbbqq2 with SMTP id qq2so711110lbb.3 for ; Sun, 05 Apr 2015 13:33:27 -0700 (PDT) In-Reply-To: <87h9su4934.fsf@netris.org> 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: Mark H Weaver Cc: Guix-devel 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. > changed to: > > (if (member "ghc" (map manifest-entry-name (manifest-entries manifest))) > ...) > > What do you think? Thanks, I will update the patch. Regards, Fede