diff mbox

[1/2] gnu: r-htmltools: Ensure temporary files can be deleted.

Message ID 20160908125105.8435-1-ricardo.wurmus@mdc-berlin.de
State New
Headers show

Commit Message

Ricardo Wurmus Sept. 8, 2016, 12:51 p.m. UTC
* gnu/packages/web.scm (r-htmltools)[arguments]: Add phase
"copy-files-without-mode".
---
 gnu/packages/web.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Leo Famulari Sept. 13, 2016, 5:48 a.m. UTC | #1
On Thu, Sep 08, 2016 at 02:51:04PM +0200, Ricardo Wurmus wrote:
> * gnu/packages/web.scm (r-htmltools)[arguments]: Add phase
> "copy-files-without-mode".

LGTM
diff mbox

Patch

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 321a250..a682e6d 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -3125,6 +3125,20 @@  directory.")
                (base32
                 "0j9bf80grd6gwh7116m575pycv87c0wcwkxsz3gzzfs4aw3pxyr9"))))
     (build-system r-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; See https://github.com/rstudio/htmltools/pull/68
+         ;; 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/html_dependency.R"
+               (("file.copy\\(from, to, " prefix)
+                (string-append prefix
+                               "copy.mode = FALSE, ")))
+             #t)))))
     (propagated-inputs
      `(("r-digest" ,r-digest)
        ("r-rcpp" ,r-rcpp)))