* 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"