aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-08-16 23:06:18 -0400
committerGravatar Peter McGoron 2025-08-16 23:06:18 -0400
commit19f660eb8e2fda83875e9053484b181b27c29836 (patch)
tree151622b851ba09cb2e785129715c0f47716fc348
parentskint (diff)
chez
-rw-r--r--README.md42
-rw-r--r--mcgoron/guix/scheme-packages.scm39
2 files changed, 62 insertions, 19 deletions
diff --git a/README.md b/README.md
index eaffede..f961cee 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,8 @@
Run Scheme implementations in Guix containers/environments, and package
libraries for them.
-Supports Chibi, Foment, Sagittarius, Gauche, Loko, STKlos, TR7, and
-Mosh.
+Supports Chibi, Foment, Sagittarius, Gauche, Loko, STKlos, TR7, Mosh,
+Chez, and SKINT.
## Portable R6RS and R7RS Libraries
@@ -16,13 +16,15 @@ use the `portable-r7rs-build-system` (`portable-r6rs-build-system`).
On systems that support both R6RS and R7RS, the R6RS libraries will
take precedence (rationale: R6RS has more stuff).
-## Chibi Scheme
+## Supported
+
+### Chibi Scheme
* Package: `chibi-scheme-with-path`
* Path: `chibi-lib-dir`, `chibi-binlib-dir`
* Supports `R7RS_LIBRARY_PATH`
-## Foment
+### Foment
* Package: `foment-with-path`
* Path: `foment-lib-dir`
@@ -32,26 +34,26 @@ The build script here will build [Foment](https://github.com/leftmike/foment).
The last release of Foment was a long time ago, so the build is for the
current HEAD at the time of writing (6089c3c).
-## Sagittarius
+### Sagittarius
* Package: `sagittarius-scheme-with-path`
* Path: `sagittarius-lib-dir`
* Supports `R7RS_LIBRARY_PATH`, `R6RS_LIBRARY_PATH`
-## Gauche
+### Gauche
* Package: `gauche-with-path`
* Pure Scheme: `gauche-pure-scheme-build-system`
TODO: explain gauche, add gauche build system
-## Loko
+### Loko
* Package: `loko-scheme-with-path`
* Path: `loko-scheme-lib-dir`
* Supports `R7RS_LIBRARY_PATH`, `R6RS_LIBRARY_PATH`
-## STKlos
+### STKlos
* Package: `stklos-with-path`
* Path: `stklos-lib-dir`
@@ -59,7 +61,7 @@ TODO: explain gauche, add gauche build system
TODO: loading bytecode
-## TR7
+### TR7
* Package: `tr7-with-path`
* Path: `tr7-lib-dir`
@@ -67,25 +69,37 @@ TODO: loading bytecode
TODO: extensions
-## Mosh
+### Mosh
* Package: `mosh-scheme-with-path`
* Path: `mosh-lib-dir`
* Supports `R6RS_LIBRARY_PATH`
-## SKint
+### SKint
* Package: `skint-with-path`
* Path: `skint-lib-dir`
* Supports `R7RS_LIBRARY_PATH`
+### Chez Scheme
+
+* Package: `chez-scheme-with-path`
+* Path: `chez-lib-dir`
+* Supports `R6RS_LIBRARY_PATH`
+
+TODO: heap files?
+
## Planned
-* Ypsilon, Picrin (should be simple)
+* Ypsilon (should be simple)
* Ikarus, Larceny, Vicare
-* Chez, and other R6RS, even unmaintained ones
* Kawa (Scheme source only, don't know enough about Java)
* The Javascipt ones
-* Racket, Gambit, Cyclone, MIT-Scheme (need to understand how they work)
+* Racket, Gambit, MIT-Scheme (need to understand how they work)
* Every R6RS/R7RS with a library load path mechanism
+### Would require some work
+
+* Picrin (does not search the filesystem for libraries)
+* Chicken, Cyclone (compilers)
+
diff --git a/mcgoron/guix/scheme-packages.scm b/mcgoron/guix/scheme-packages.scm
index 84f6675..4018efe 100644
--- a/mcgoron/guix/scheme-packages.scm
+++ b/mcgoron/guix/scheme-packages.scm
@@ -37,6 +37,7 @@
#:use-module (gnu packages tls)
#:use-module (gnu packages textutils)
#:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages chez)
#:use-module (guix gexp))
;;;;;;;;;;;;;
@@ -587,7 +588,7 @@ developers freedom in balancing features and footprint.")
(define-public mosh-build-system
(default-copying-build-system 'mosh
"Copy Scheme libraries into Mosh directory"
- foment-lib-dir))
+ mosh-lib-dir))
(define-public mosh-scheme
(package
@@ -600,10 +601,6 @@ developers freedom in balancing features and footprint.")
(patches (search-patches "mcgoron/guix/patches/mosh-0.2.9-rc1-fix-ffitest.patch"))
(sha256 (base32 "07w49dbhy3zgn9kq8lqwshjy66plpjkb9dv20sczkqr8w4vbs4cz"))))
(build-system gnu-build-system)
- #;(arguments '(#:phases (modify-phases %standard-phases
- ;; Tests don't work yet. Issues with network.
- (add-before 'check 'remove-broken-tests
- (lambda _ )))))
(inputs (list oniguruma gmp openssl))
(home-page "https://mosh.monaos.org")
(synopsis "Free and fast R6RS interpreter")
@@ -694,3 +691,35 @@ The current release of Mosh supports all of the features R7RS small and R6RS."))
;;;; Ypsilon: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ypsilon/ypsilon-0.9.6.update3.tar.gz
+
+;;;;;;;;;
+;;;; Chez
+;;;;;;;;;
+
+(define-public chez-lib-dir "share/chez")
+
+(define-public chez-scheme-build-system
+ (default-copying-build-system 'chez
+ "Copy Scheme libraries into Chez directory"
+ chez-lib-dir))
+
+(define-public chez-scheme-with-path
+ (package/path chez-scheme
+ "chez-scheme"
+ "Chez with Guix paths"
+ "Wrapper for Chez that adds Guix-managed paths"
+ "/bin/chez-scheme"
+ "/bin/chez-scheme"
+ "GUIX_CHEZ_PATH"
+ (list r6rs-search-path-specification)
+ chez-lib-dir
+ `(lambda (sh impl)
+ (format #t
+ "#!~a
+
+ ~a
+ exec -a $0 \"~a\" \"$@\""
+ sh
+ ,(append-to "CHEZSCHEMELIBDIRS" "GUIX_CHEZ_PATH" "R6RS_LIBRARY_PATH")
+ impl))))
+