diff --git a/doc/chibi.scrbl b/doc/chibi.scrbl index 16436348..837a0d31 100755 --- a/doc/chibi.scrbl +++ b/doc/chibi.scrbl @@ -1666,8 +1666,8 @@ installed. The following are currently supported: \item{gauche - version >= 0.9.4} \item{kawa - version >= 2.0; you need to add the install dir to the search path, e.g. \scheme{-Dkawa.import.path=/usr/local/share/kawa/lib/*.sld}} \item{larceny - version 0.98; you need to add "lib/Snow" to the paths in startup.sch} -\item{sagittarius - version >= 0.9.13} +\item{mosh - version >= 0.29-rc1} \item{racket - version >= 8.16 with the \scheme{r7rs} pkg} -\item{sagittarius - version >= 0.98} +\item{sagittarius - version >= 0.9.13} \item{stklos - version > 2.10} ] diff --git a/lib/chibi/snow/commands.scm b/lib/chibi/snow/commands.scm index 141fe3d7..0991f1ed 100644 --- a/lib/chibi/snow/commands.scm +++ b/lib/chibi/snow/commands.scm @@ -1412,6 +1412,20 @@ "(begin (display (getenv \"LARCENY_ROOT\")) (exit))")) char-whitespace?) "lib/Snow"))) + ((mosh) + (call-with-temp-file "snow-mosh.scm" + (lambda (tmp-path out preserve) + (with-output-to-file tmp-path + (lambda () + (display "(import (scheme base) (scheme write) (mosh config))") + (newline) + (display "(display (get-config \"library-path\"))"))) + (list (make-path (process->string `(mosh ,tmp-path)) "lib"))))) + ((racket) + (list + (make-path + (process->string + '(racket -I racket/base -e "(display (find-system-path 'collects-dir))"))))) ((sagittarius) (list (make-path (process->string @@ -1420,11 +1434,6 @@ (list (make-path (process->string '(stklos -e "(display (install-path #:libdir))"))))) - ((racket) - (list - (make-path - (process->string - '(racket -I racket/base -e "(display (find-system-path 'collects-dir))"))))) (else (list (make-path (or (conf-get cfg 'install-prefix) "/usr/local") "share/snow" @@ -1512,6 +1521,10 @@ --r7rs --script ,file) `(kawa ,(string-append "-Dkawa.import.path=" install-dir) --r7rs --script ,file)))) + ((mosh) + (if lib-path + `(mosh --loadpath= ,install-dir --loadpath= ,lib-path ,file) + `(mosh --loadpath= ,install-dir ,file))) ((larceny) (if lib-path `(larceny -r7rs -path ,(string-append install-dir ":" lib-path) @@ -1738,8 +1751,9 @@ ((eq? impl 'generic) (get-install-library-dir impl cfg)) ((eq? impl 'guile) (get-guile-site-dir)) ((eq? impl 'kawa) (get-install-library-dir impl cfg)) - ((eq? impl 'sagittarius) (get-install-library-dir impl cfg)) + ((eq? impl 'mosh) (get-install-library-dir impl cfg)) ((eq? impl 'racket) (get-install-library-dir impl cfg)) + ((eq? impl 'sagittarius) (get-install-library-dir impl cfg)) ((eq? impl 'stklos) (get-install-library-dir impl cfg)) ((conf-get cfg 'install-source-dir)) ((conf-get cfg 'install-prefix) @@ -1753,8 +1767,9 @@ ((eq? impl 'gambit) (get-install-library-dir impl cfg)) ((eq? impl 'generic) (get-install-library-dir impl cfg)) ((eq? impl 'kawa) (get-install-library-dir impl cfg)) - ((eq? impl 'sagittarius) (get-install-library-dir impl cfg)) + ((eq? impl 'mosh) (get-install-library-dir impl cfg)) ((eq? impl 'racket) (get-install-library-dir impl cfg)) + ((eq? impl 'sagittarius) (get-install-library-dir impl cfg)) ((eq? impl 'stklos) (get-install-library-dir impl cfg)) ((conf-get cfg 'install-data-dir)) ((conf-get cfg 'install-prefix) @@ -1781,10 +1796,12 @@ (get-guile-site-ccache-dir)) ((eq? impl 'kawa) (car (get-install-dirs impl cfg))) - ((eq? impl 'sagittarius) + ((eq? impl 'mosh) (car (get-install-dirs impl cfg))) ((eq? impl 'racket) (car (get-install-dirs impl cfg))) + ((eq? impl 'sagittarius) + (car (get-install-dirs impl cfg))) ((eq? impl 'stklos) (car (get-install-dirs impl cfg))) ((conf-get cfg 'install-prefix) diff --git a/lib/chibi/snow/utils.scm b/lib/chibi/snow/utils.scm index 90fa7456..6f07b42e 100644 --- a/lib/chibi/snow/utils.scm +++ b/lib/chibi/snow/utils.scm @@ -43,6 +43,17 @@ ,(delay (process->sexp '(kawa -e "(write (features))")))) + (mosh "mosh" (mosh -v) #f + ,(delay + (call-with-temp-file "snow-mosh.scm" + (lambda (tmp-path out preserve) + (with-output-to-file tmp-path + (lambda () + (display "(import (scheme base) (scheme write) (mosh config))") + (newline) + (display "(display (features))"))) + (process->sexp + `(mosh ,tmp-path)))))) (larceny "larceny" (larceny --version) "v0.98" ,(delay '())) (racket "racket" (racket --version) #f diff --git a/lib/chibi/snow/utils.sld b/lib/chibi/snow/utils.sld index e62d3cd0..45584967 100644 --- a/lib/chibi/snow/utils.sld +++ b/lib/chibi/snow/utils.sld @@ -20,6 +20,7 @@ (chibi pathname) (chibi process) (chibi string) + (chibi temp-file) (chibi uri)) (cond-expand (chibi (import (chibi io)))