From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] r: make and install info files Date: Tue, 30 Jun 2015 16:40:21 +0200 Message-ID: References: <20150630085317.ADF86D56E8@emkei.cz> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9wiG-0001qB-8T for guix-devel@gnu.org; Tue, 30 Jun 2015 10:40:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9wiB-00080V-2W for guix-devel@gnu.org; Tue, 30 Jun 2015 10:40:40 -0400 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:38207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9wiA-00080H-Ov for guix-devel@gnu.org; Tue, 30 Jun 2015 10:40:34 -0400 In-Reply-To: <20150630085317.ADF86D56E8@emkei.cz> 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: m8r-y0v7u9@mailinator.com Cc: guix-devel@gnu.org Hi, > * gnu/packages/statistics.scm (r)[arguments]: make and install info files > > diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm > index 0b9e081..0dfe25d 100644 > --- a/gnu/packages/statistics.scm > +++ b/gnu/packages/statistics.scm > @@ -63,7 +63,23 @@ > 'check 'set-timezone > ;; Some tests require the timezone to be set. > (lambda _ (setenv "TZ" "UTC")) > - %standard-phases) > + (alist-cons-after > + 'install 'install-info > + (lambda* (#:key inputs outputs #:allow-other-keys) > + ;; Install the Info manual, unless Texinfo is missing. > + (or (not (assoc-ref inputs "texinfo")) This seems a bit odd. We have control over whether "texinfo" is among the inputs, so I don't think this check is useful. > + (let ((out (assoc-ref outputs "out"))) > + (and (zero? (system* "make" "info")) > + (let ((infodir (string-append out "/share/info"))) > + (mkdir-p infodir) > + (chdir "./doc/manual") > + (for-each (lambda (info) > + (copy-file > + info > + (string-append infodir "/" info))) > + (find-files "." "\\.info$")) > + #t))))) > + %standard-phases)) > #:configure-flags > '("--with-blas" > "--with-lapack" I also wonder if maybe we should switch to using the (modify-phases ...) syntax before adding new phases. This would avoid future indentation-only modifications. What do you think? ~~ Ricardo