diff mbox series

[bug#56534,v2,1/4] gnu: racket: Fix layered documentation rendering.

Message ID 159d655db30eea3a45d9f75e30fd875010ae7aa6.1697849395.git.philip@philipmcgrath.com
State New
Headers show
Series gnu: Add racket-with-video. | expand

Commit Message

Philip McGrath Oct. 21, 2023, 2:01 a.m. UTC
We want to create additional Guix packages (e.g. 'racket-with-video')
that extend our 'racket' package as the 'racket' package extends
'racket-minimal', using Racket’s support for “layered installations”.
Without this fix, rendering the documentation for the new layer would
try to write to the parent layer in the store, breaking the build.

See upstream discussion at <https://github.com/racket/racket/pull/4802>.

* gnu/packages/racket.scm (racket)[inputs]: Add an additional snippet to
'%racket-origin' when used for the Racket package 'racket-index'.
---
 gnu/packages/racket.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 1e97f19dbb..a127f75669 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -676,7 +676,18 @@  (define-public racket
        "algol60" (base32 "03akd7xhn4l7y66qgaimvdbn6gq7ay6j03dc11mz80n06z21dfb6")
        '(("algol60" ".")))
       (racket-packages-origin
-       "racket" %racket-origin
+       "racket" (origin
+                  (inherit %racket-origin)
+                  (snippet
+                   ;; Workaround for https://github.com/racket/racket/pull/4802
+                   ;; TODO: When updating to Racket 8.11, include the upstream
+                   ;; fix in %racket-origin (probably as a patch).
+                   #~(begin
+                       #$(origin-snippet %racket-origin)
+                       (substitute*
+                           "pkgs/racket-index/scribblings/main/info.rkt"
+                         (("no-depend-on[)]")
+                          "no-depend-on every-main-layer)")))))
        '(("at-exp-lib" "pkgs/at-exp-lib")
          ("compiler" "pkgs/compiler")
          ("compiler-lib" "pkgs/compiler-lib")