1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: r-sass: Ensure that copied files are writable.

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

Change-Id: If53ad242e5fcfa6951631ed7a1807a8930e92be3
This commit is contained in:
Ricardo Wurmus
2025-11-12 20:03:53 +01:00
parent a212e20f65
commit fe07e80b00

View File

@@ -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"))))))