summary refs log tree commit diff
path: root/gnu/packages/statistics.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-12-06 13:21:21 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-12-09 19:17:16 +0100
commit4709decb453ac21c4602f78ee692cee37346dea2 (patch)
tree7506a587f6cd2554e3a3a99b07cf4f739043d645 /gnu/packages/statistics.scm
parentd974b3f8609d015fc1a5be616610a6638b1eaf8a (diff)
downloadguix-4709decb453ac21c4602f78ee692cee37346dea2.tar.gz
gnu: r-minimal: Remove extraneous references.
* gnu/packages/statistics.scm (r-minimal)[arguments]: Remove references to
native build-time tools.
Diffstat (limited to 'gnu/packages/statistics.scm')
-rw-r--r--gnu/packages/statistics.scm39
1 files changed, 38 insertions, 1 deletions
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index cf7a64ec7a..599d6a8fc3 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -403,12 +403,49 @@ available, greatly increasing its breadth and scope.")
     (arguments
      `(#:tests? #f
        ,@(substitute-keyword-arguments (package-arguments r-with-tests)
+           ((#:disallowed-references refs '())
+            (cons perl refs))
            ((#:configure-flags flags)
             ;; Do not build the recommended packages.  The build system creates
             ;; random temporary directories and embeds their names in some
             ;; package files.  We build these packages with the r-build-system
             ;; instead.
-            `(cons "--without-recommended-packages" ,flags)))))))
+            `(cons "--without-recommended-packages" ,flags))
+           ((#:phases phases '%standard-phases)
+            `(modify-phases ,phases
+               (add-after 'install 'remove-extraneous-references
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let ((out (assoc-ref outputs "out")))
+                     (substitute* (string-append out "/lib/R/etc/Makeconf")
+                       (("^# configure.*")
+                        "# Removed to avoid extraneous references\n"))
+                     (substitute* (string-append out "/lib/R/bin/libtool")
+                       (((string-append
+                          "(-L)?("
+                          (assoc-ref inputs "bzip2")
+                          "|"
+                          (assoc-ref inputs "perl")
+                          "|"
+                          (assoc-ref inputs "texlive")
+                          "|"
+                          (assoc-ref inputs "texlive-bin")
+                          "|"
+                          (assoc-ref inputs "texinfo")
+                          "|"
+                          (assoc-ref inputs "xz")
+                          "|"
+                          (format #false
+                                  "/gnu/store/[^-]+-(~{~a~^|~})-[^/]+"
+                                  '("glibc-utf8-locales"
+                                    "libselinux"
+                                    "libsepol"
+                                    "file"
+                                    "texlive-bin"
+                                    "util-macros"
+                                    "graphite2"))
+                          "|"
+                          "/gnu/store/[^-]+-glibc-[^-]+-static"
+                          ")/lib")) ""))))))))))))
 
 (define-public rmath-standalone
   (package (inherit r-minimal)