guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: r-rmarkdown: Ensure temporary files can be deleted.


From: Ricardo Wurmus
Subject: 02/02: gnu: r-rmarkdown: Ensure temporary files can be deleted.
Date: Wed, 21 Sep 2016 19:38:49 +0000 (UTC)

rekado pushed a commit to branch master
in repository guix.

commit b78891b0120c2e6f7752912d43bc59e18ed9c465
Author: Ricardo Wurmus <address@hidden>
Date:   Wed Sep 21 21:38:01 2016 +0200

    gnu: r-rmarkdown: Ensure temporary files can be deleted.
    
    * gnu/packages/statistics.scm (r-rmarkdown)[arguments]: Add phase
    "copy-files-without-mode".
---
 gnu/packages/statistics.scm |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 853a259..2a9a31e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -1953,6 +1953,20 @@ encoder/decoder, round-off-error-free sum and cumsum, 
etc.")
             "0c7gs9c8xdjfxviw0syh13pf3vys2b2ssixmnyqbji64xdscn7pz"))))
     (properties `((upstream-name . "rmarkdown")))
     (build-system r-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; See https://github.com/rstudio/rmarkdown/pull/800
+         ;; The resource files are in the store and have mode 444.  After
+         ;; copying the files R fails to remove them again because it doesn't
+         ;; have write access to them.
+         (add-after 'unpack 'copy-files-without-mode
+           (lambda _
+             (substitute* "R/render.R"
+               (("file.copy\\(from = from," prefix)
+                (string-append prefix
+                               " copy.mode = FALSE, ")))
+             #t)))))
     (propagated-inputs
      `(("r-catools" ,r-catools)
        ("r-htmltools" ,r-htmltools)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]