diff options
| author | 2025-08-16 22:48:37 -0400 | |
|---|---|---|
| committer | 2025-08-16 22:48:37 -0400 | |
| commit | 338b910c0c5c81f6f979fcf5aeb24ed3e1c84e1d (patch) | |
| tree | e603cd445aa41f5d4f5f44d1b661b4f47db5a733 | |
| parent | mosh (diff) | |
skint
| -rw-r--r-- | README.md | 12 | ||||
| -rw-r--r-- | mcgoron/guix/patches/skint-060-add-stdarg.patch | 24 | ||||
| -rw-r--r-- | mcgoron/guix/scheme-packages.scm | 64 |
3 files changed, 98 insertions, 2 deletions
@@ -3,6 +3,9 @@ Run Scheme implementations in Guix containers/environments, and package libraries for them. +Supports Chibi, Foment, Sagittarius, Gauche, Loko, STKlos, TR7, and +Mosh. + ## Portable R6RS and R7RS Libraries Some Scheme systems packaged here will read `R7RS_LIBRARY_PATH` @@ -70,9 +73,16 @@ TODO: extensions * Path: `mosh-lib-dir` * Supports `R6RS_LIBRARY_PATH` +## SKint + +* Package: `skint-with-path` +* Path: `skint-lib-dir` +* Supports `R7RS_LIBRARY_PATH` + ## Planned -* Picrin (should be simple) +* Ypsilon, Picrin (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 diff --git a/mcgoron/guix/patches/skint-060-add-stdarg.patch b/mcgoron/guix/patches/skint-060-add-stdarg.patch new file mode 100644 index 0000000..a538279 --- /dev/null +++ b/mcgoron/guix/patches/skint-060-add-stdarg.patch @@ -0,0 +1,24 @@ +diff --git a/n.h b/n.h +index e54c4ea..4a2455d 100644 +--- a/n.h ++++ b/n.h +@@ -15,6 +15,7 @@ + #include <stddef.h> + #include <stdlib.h> + #include <assert.h> ++#include <stdarg.h> + /* extra includes */ + #include <math.h> + #include <errno.h> +diff --git a/s.h b/s.h +index c7bbcaa..21052df 100644 +--- a/s.h ++++ b/s.h +@@ -24,6 +24,7 @@ + #include <stdio.h> + #include <wchar.h> + #include <assert.h> ++#include <stdarg.h> + + #if defined(_MSC_VER) + #ifdef _POSIX_ diff --git a/mcgoron/guix/scheme-packages.scm b/mcgoron/guix/scheme-packages.scm index f5d0b59..84f6675 100644 --- a/mcgoron/guix/scheme-packages.scm +++ b/mcgoron/guix/scheme-packages.scm @@ -250,7 +250,7 @@ (invoke "make" "stress-test"))))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") + (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))) (install-file "unix/release/foment" bin) (copy-recursively "unix/debug/foment" @@ -632,3 +632,65 @@ The current release of Mosh supports all of the features R7RS small and R6RS.")) ,(append-to "MOSH_LOADPATH" "GUIX_MOSH_PATH" "R6RS_LIBRARY_PATH") impl)))) +;;;;;;;;;;;;;;; +;;;; SKint +;;;;;;;;;;;;;;; + +(define-public skint-lib-dir "share/skint") + +(define-public skint-build-system + (default-copying-build-system 'skint + "Copy Scheme libraries into SKint directory" + skint-lib-dir)) + +(define-public skint + (package + (name "skint") + (version "060") + (source + (origin + (method git-fetch) + (uri (git-reference (url "https://github.com/false-schemers/skint") + (commit "v060"))) + (patches (search-patches "mcgoron/guix/patches/skint-060-add-stdarg.patch")) + (sha256 (base32 "0bxbgw828777wvhyb5w3air02k5x57ma92vwwsrlba2v9vmarjq8")))) + (build-system gnu-build-system) + (arguments '(#:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./configure" + (string-append "--prefix=" + (assoc-ref %outputs "out"))))) + (replace 'check + (lambda _ (invoke "make" "test")))))) + (home-page "https://github.com/false-schemers/skint") + (synopsis "Cheap and fast R7RS Scheme interpreter") + (license bsd-3) + (description "SKINT is a portable interpreter for the R7RS Scheme programming language. It can be built from five C source files (~11K lines of code) with a single command. There are no distributives or packages; just compile the source files with your favorite C compiler, link them with the standard C runtime libraries, and you're done."))) + +(define-public skint-with-path + (package/path skint + "skint" + "SKINT with Guix paths" + "Wrapper for SKINT that adds Guix-managed paths" + "/bin/skint" + "/bin/skint" + "GUIX_SKINT_PATH" + (list r7rs-search-path-specification) + skint-lib-dir + `(lambda (sh impl) + (format #t + "#!~a + + ~a + if [ -z \"$SKINT_LIBDIRS\" ]; then + export SKINT_LIBDIRS=\".:./lib\" + fi + + exec -a $0 \"~a\" \"$@\"" + sh + ,(append-to "SKINT_LIBDIRS" "GUIX_SKINT_PATH" "R7RS_LIBRARY_PATH") + impl)))) + + +;;;; Ypsilon: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ypsilon/ypsilon-0.9.6.update3.tar.gz |
