aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-08-16 19:37:16 -0400
committerGravatar Peter McGoron 2025-08-16 19:37:16 -0400
commitb41b1a36b536038dcf887f69ef19a42d3771cff5 (patch)
tree27b37a4217d250154a9643c704a2771c060998d5
parentgauche with path (diff)
Loko
Diffstat (limited to '')
-rw-r--r--README.md17
-rw-r--r--mcgoron/guix/scheme-packages.scm31
2 files changed, 40 insertions, 8 deletions
diff --git a/README.md b/README.md
index 697ddc3..e605f7b 100644
--- a/README.md
+++ b/README.md
@@ -15,14 +15,12 @@ take precedence (rationale: R6RS has more stuff).
## Chibi Scheme
-* Library: `(mcgoron guix chibi)`
* Package: `chibi-scheme-with-path`
* Path: `chibi-lib-dir`, `chibi-binlib-dir`
* Supports `R7RS_LIBRARY_PATH`
## Foment
-* Library: `(mcgoron guix foment)`
* Package: `foment-with-path`
* Path: `foment-lib-dir`
* Supports `R7RS_LIBRARY_PATH`
@@ -33,23 +31,26 @@ current HEAD at the time of writing (6089c3c).
## Sagittarius
-* Library: `(mcgoron guix sagittarius)`
-* Package: `sagittarius-scheme`
+* Package: `sagittarius-scheme-with-path`
* Path: `sagittarius-lib-dir`
* Supports `R7RS_LIBRARY_PATH`, `R6RS_LIBRARY_PATH`
## Gauche
-* Library: `(mcgoron guix gauche)`
* Package: `gauche-with-path`
* Pure Scheme: `gauche-pure-scheme-build-system`
-* Gauche Packages: `gauche-package-build-system`
-TODO: gauche build systems
+TODO: explain gauche, add gauche build system
+
+## Loko
+
+* Package: `loko-scheme-with-path`
+* Path: `loko-scheme-lib-dir`
+* Supports `R7RS_LIBRARY_PATH`, `R6RS_LIBRARY_PATH`
## Planned
-* Loko, STKlos, TR7, Mosh, Picrin (should be simple)
+* STKlos, TR7, Mosh, Picrin (should be simple)
* Chez, and other R6RS, even unmaintained ones
* Kawa (Scheme source only, don't know enough about Java)
* The Javascipt ones
diff --git a/mcgoron/guix/scheme-packages.scm b/mcgoron/guix/scheme-packages.scm
index d7ba866..f8dfed5 100644
--- a/mcgoron/guix/scheme-packages.scm
+++ b/mcgoron/guix/scheme-packages.scm
@@ -419,3 +419,34 @@
,(append-to "GAUCHE_DYNLOAD_PATH" "GUIX_GAUCHE_DYN_PATH")
impl)))))
+;;;;;;;;;;
+;;;; Loko
+;;;;;;;;;;
+
+(define-public loko-scheme-lib-dir "share/loko")
+
+(define-public loko-scheme-build-system
+ (default-copying-build-system 'loko
+ "Copy Scheme libraries into Loko directory"
+ loko-scheme-lib-dir))
+
+(define-public loko-scheme-with-path
+ (package/path loko-scheme
+ "loko-scheme"
+ "Loko Scheme with Guix paths"
+ "Wrapper for Loko that adds Guix-managed paths"
+ "/bin/loko"
+ "/bin/loko"
+ "GUIX_LOKO_PATH"
+ (list r6rs-search-path-specification r7rs-search-path-specification)
+ loko-scheme-lib-dir
+ `(lambda (sh impl)
+ (format #t
+ "#!~a
+
+ ~a
+ exec -a $0 \"~a\" \"$@\""
+ sh
+ ,(append-to "LOKO_LIBRARY_PATH" "GUIX_LOKO_PATH" "R6RS_LIBRARY_PATH" "R7RS_LIBRARY_PATH")
+ impl))))
+