* [PATCH] r: make and install info files
@ 2015-06-30 8:53 m8r-y0v7u9
2015-06-30 14:40 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: m8r-y0v7u9 @ 2015-06-30 8:53 UTC (permalink / raw)
To: guix-devel
* 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"))
+ (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"
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] r: make and install info files
2015-06-30 8:53 [PATCH] r: make and install info files m8r-y0v7u9
@ 2015-06-30 14:40 ` Ricardo Wurmus
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2015-06-30 14:40 UTC (permalink / raw)
To: m8r-y0v7u9; +Cc: guix-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] r: make and install info files
@ 2015-07-01 11:31 m8r-y0v7u9
0 siblings, 0 replies; 3+ messages in thread
From: m8r-y0v7u9 @ 2015-07-01 11:31 UTC (permalink / raw)
To: guix-devel
Thanks for the review and comments. Below is a revised patch.
It seemed to work ok here.
--------
* gnu/packages/statistics.scm (r)[arguments]: make and install info files
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 91d988e..35355f7 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -58,11 +58,23 @@
(assoc-ref %outputs "out")
"/lib/R/lib"))
#:phases
- (alist-cons-before
- 'check 'set-timezone
- ;; Some tests require the timezone to be set.
- (lambda _ (setenv "TZ" "UTC"))
- %standard-phases)
+ (modify-phases %standard-phases
+ (add-before 'check 'set-timezone
+ ;; Some tests require the timezone to be set.
+ (lambda _ (setenv "TZ" "UTC")))
+ (add-after 'install 'install-info
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (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))))))
#:configure-flags
'("--with-blas"
"--with-lapack"
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-01 11:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-30 8:53 [PATCH] r: make and install info files m8r-y0v7u9
2015-06-30 14:40 ` Ricardo Wurmus
-- strict thread matches above, loose matches on Subject: below --
2015-07-01 11:31 m8r-y0v7u9
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.