Merge pull request #1032 from Retropikzel/snow-chibi-mosh

Add support for Mosh to snow-chibi
This commit is contained in:
Alex Shinn 2025-07-15 11:16:27 +09:00 committed by GitHub
commit d9305fe98b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 10 deletions

View file

@ -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}
]

View file

@ -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)

View file

@ -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

View file

@ -20,6 +20,7 @@
(chibi pathname)
(chibi process)
(chibi string)
(chibi temp-file)
(chibi uri))
(cond-expand
(chibi (import (chibi io)))