~ruther/guix-local

fe07e80b0055f16299af5f89953787a9fb3dd314 — Ricardo Wurmus 4 months ago a212e20
gnu: r-sass: Ensure that copied files are writable.

* gnu/packages/cran.scm (r-sass)[arguments]: Add phase 'fix-file-permissions.

Change-Id: If53ad242e5fcfa6951631ed7a1807a8930e92be3
1 files changed, 12 insertions(+), 0 deletions(-)

M gnu/packages/cran.scm
M gnu/packages/cran.scm => gnu/packages/cran.scm +12 -0
@@ 12802,6 12802,18 @@ weights.")
     (list
      #:phases
      '(modify-phases %standard-phases
         ;; write_file_attachments copies files from the store but does not
         ;; check their permissions. The files end up with read-only
         ;; permissions.  As a result, they cannot be overwritten in
         ;; subsequent passes.  This is especially problematic in downstream
         ;; packages like r-bslib.
         (add-after 'unpack 'fix-file-permissions
           (lambda _
             (substitute* "R/layers.R"
               (("recursive = TRUE")
                "recursive = TRUE, copy.mode = FALSE")
               (("fs::file_copy\\(src, dest, overwrite = TRUE\\)")
                "file.copy(src, dest, overwrite = TRUE, copy.mode = FALSE)"))))
         ;; One test fails when the current locale is the C locale.
         (add-before 'check 'set-test-locale
           (lambda _ (setenv "LC_ALL" "en_US.UTF-8"))))))