diff options
author | Philip McGrath <philip@philipmcgrath.com> | 2022-08-27 14:55:47 -0400 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-09-04 23:10:11 +0200 |
commit | 07a8440f502a1e864258417af37c25ca33e24dde (patch) | |
tree | febd8ba9c185b3280e0a23d88f40f1dd33253399 /gnu/packages/racket.scm | |
parent | 5142fba364a991fdb797208275d760033d09199b (diff) | |
download | guix-07a8440f502a1e864258417af37c25ca33e24dde.tar guix-07a8440f502a1e864258417af37c25ca33e24dde.tar.gz |
gnu: Add Zuo.
* gnu/packages/patches/racket-backport-8.6-zuo.patch,
gnu/packages/patches/racket-zuo-bin-sh.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/racket.scm (%zuo-version): New variable.
(zuo): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/racket.scm')
-rw-r--r-- | gnu/packages/racket.scm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 0f766e7850..70df5482fb 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -200,6 +200,7 @@ otherwise." racket-vm-bc)) (define %racket-version "8.5") ; Remember to update chez-scheme-for-racket! +(define %zuo-version "1.0") ; defined in racket/src/zuo/zuo.c (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin @@ -232,6 +233,54 @@ otherwise." ;; Unbundle libffi. (delete-file-recursively "racket/src/bc/foreign/libffi"))))) + +(define-public zuo + (let ((revision #f)) + (package + (name "zuo") + (version (string-append %zuo-version + "-racket" + "8.6" + (if revision "-guix" "") + (or revision ""))) + (source + (origin + (inherit %racket-origin) + (uri (git-reference + (url "https://github.com/racket/racket") + (commit "v8.6"))) + (sha256 + (base32 "1yi36nr7zrdwrnvpmliirxxjz4pyfyhkar6yvk3rapvmg4q2vmnk")) + (patches (append (origin-patches %racket-origin) + (search-patches "racket-backport-8.6-zuo.patch" + "racket-zuo-bin-sh.patch"))) + (file-name (git-file-name "racket" "8.6")))) + (outputs '("out" "debug")) + (build-system gnu-build-system) + (arguments + (list + #:out-of-source? #t + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/zuo")))))) + (home-page "https://github.com/racket/zuo") + ;; ^ This is downstream of https://github.com/racket/racket, + ;; but it's designed to be a friendly landing place + (synopsis "Tiny Racket for build scripts") + (description "Zuo (作) is a tiny Racket with primitives for dealing +with files and running processes. It comes with a @command{make}-like +embedded DSL, which is used to build Racket itself. + +Zuo is a Racket variant in the sense that program files start with +@code{#lang}, and the module path after @code{#lang} determines the parsing +and expansion of the file content. That's how the @command{make}-like DSL is +defined, and even the base Zuo language is defined by layers of @code{#lang}s. +One of the early layers implements macros.") + (license (list license:asl2.0 license:expat))))) + + (define racket-vm-common-configure-flags #~`(,@(cond ((false-if-exception |