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

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

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

Change-Id: Idccb1ef5a271f04f50e60b4a639c87bf2ac87b4e
This commit is contained in:
Ricardo Wurmus
2025-11-12 20:07:11 +01:00
parent fe07e80b00
commit 6c02d882d2

View File

@@ -12922,6 +12922,19 @@ Markdown documents. More generally, icons can be inserted in any
(guix build minify-build-system))
#:phases
#~(modify-phases (@ (guix build r-build-system) %standard-phases)
;; When using themes, bslib copies theme dependencies, such as
;; bootstrap.bundle.min.js or selectize.min.js, into a temporary
;; directory. Since these files are copied from the read-only
;; store, they end up with read-only permissions. As a result,
;; bslib cannot overwrite these files as needed, because it has no
;; permission to write to the files.
(add-after 'unpack 'fix-file-permissions
(lambda _
(substitute* "R/bs-dependencies.R"
(("overwrite = TRUE")
(string-append "overwrite = TRUE, copy.mode = FALSE"))
(("file.copy\\(precompiled_css, out_file\\)")
"file.copy(precompiled_css, out_file, copy.mode = FALSE)"))))
(add-after 'unpack 'process-javascript
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "inst/"