guix_mirror_bot pushed a commit to branch r-team
in repository guix.

commit b1877f5979b1a30c19ee0a1b11e9442094daaaaf
Author: Ricardo Wurmus <[email protected]>
AuthorDate: Wed Nov 12 20:07:11 2025 +0100

    gnu: r-bslib: Ensure that copied files are writable.
    
    * gnu/packages/cran.scm (r-bslib)[arguments]: Add phase 
'fix-file-permissions.
    
    Change-Id: Idccb1ef5a271f04f50e60b4a639c87bf2ac87b4e
---
 gnu/packages/cran.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 5382388d9a..ae234fa152 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -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/"

Reply via email to