summary refs log tree commit diff
path: root/gnu/packages/racket.scm
diff options
context:
space:
mode:
authorPhilip McGrath <philip@philipmcgrath.com>2022-02-27 16:29:15 -0500
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-03-04 23:44:11 +0100
commit6bca38f2824c5f3bd3be7ee138a5d266cb96f91d (patch)
tree2486a6654af8152b34cbd14b9db0a15e44dde76f /gnu/packages/racket.scm
parente8518c43a34f8f914b0235c1c4a94dfc9f73e954 (diff)
downloadguix-6bca38f2824c5f3bd3be7ee138a5d266cb96f91d.tar.gz
gnu: Add chez-nanopass.
* gnu/packages/chez.scm (nanopass): Rename to ...
(chez-nanopass-bootstrap): ... this new variable, and promote it from an
origin to a package.
(chez-nanopass): New variable.
(unpack-nanopass+stex): New variable using 'chez-nanopass-bootstrap'.
(chez-scheme-for-racket-bootstrap-bootfiles)
(chez-scheme)[native-inputs]: Add 'chez-nanopass-bootstrap'.
[arguments]<#:phases>: Adapt 'unpack-nanopass+stex' phase
to use the new variable.
* gnu/packages/racket.scm (racket-vm-cs): Likewise.
(make-unpack-nanopass+stex): Remove it.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/racket.scm')
-rw-r--r--gnu/packages/racket.scm19
1 files changed, 2 insertions, 17 deletions
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index c982a964ff..716f3f72a1 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -254,22 +254,6 @@
       "--enable-origtree"
       ,(string-append "--prefix=" #$output "/opt/racket-vm")))
 
-(define (make-unpack-nanopass+stex)
-  ;; Adapted from chez-scheme.
-  ;; Thunked to avoid evaluating 'chez-scheme' too early.
-  ;; TODO: Refactor enough to share this directly.
-  #~(begin
-      (copy-recursively
-       #$nanopass
-       "nanopass"
-       #:keep-mtime? #t)
-      (mkdir-p "stex")
-      (with-output-to-file "stex/Mf-stex"
-        (lambda ()
-          ;; otherwise, it will try to download submodules
-          (display "# to placate ../configure")))))
-
-
 (define-public racket-vm-cgc
   ;; Eventually, it may make sense for some vm packages to not be hidden,
   ;; but this one is especially likely to remain hidden.
@@ -387,6 +371,7 @@ collector, 3M (``Moving Memory Manager'').")
      (modify-inputs (package-native-inputs racket-vm-cgc)
        (delete "libtool")
        (prepend chez-scheme-for-racket-bootstrap-bootfiles
+                chez-nanopass-bootstrap
                 racket-vm-bc)))
     (arguments
      (substitute-keyword-arguments (package-arguments racket-vm-cgc)
@@ -395,7 +380,7 @@ collector, 3M (``Moving Memory Manager'').")
             (add-after 'unpack 'unpack-nanopass+stex
               (lambda args
                 (with-directory-excursion "racket/src/ChezScheme"
-                  #$(make-unpack-nanopass+stex))))
+                  #$unpack-nanopass+stex)))
             (add-after 'unpack-nanopass+stex 'unpack-bootfiles
               (lambda* (#:key native-inputs inputs #:allow-other-keys)
                 (with-directory-excursion "racket/src/ChezScheme"