guix_mirror_bot pushed a commit to branch r-team
in repository guix.
commit f28aa7386b1b1077e16492f5fcc4876bf6f5e901
Author: Ricardo Wurmus <[email protected]>
AuthorDate: Wed Nov 12 20:03:53 2025 +0100
gnu: r-sass: Ensure that copied files are writable.
* gnu/packages/cran.scm (r-sass)[arguments]: Add phase
'fix-file-permissions.
Change-Id: If53ad242e5fcfa6951631ed7a1807a8930e92be3
---
gnu/packages/cran.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 46d4648616..5382388d9a 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -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"))))))