Compare commits
3 Commits
6c3978792c
...
e124bc16c0
| Author | SHA1 | Date |
|---|---|---|
|
|
e124bc16c0 | |
|
|
2c3fbcab55 | |
|
|
d4e05b61cc |
91
README.md
91
README.md
|
|
@ -10,6 +10,10 @@ Tool to create Scheme virtual environments
|
|||
|
||||
scheme-venv chibi r7rs venv
|
||||
|
||||
Note that scheme-venv does not install snow-chibi, akku or any Scheme
|
||||
implementations. You have to install them yourself into your system.
|
||||
|
||||
### bin/activate
|
||||
|
||||
First argument is Scheme, second is RnRS and third is path to directory. The
|
||||
directory must not exist.
|
||||
|
|
@ -20,33 +24,78 @@ After the virtual environment is created you can activate is with:
|
|||
|
||||
|
||||
After activation you can install packages with either snow-chibi or akku and
|
||||
they will be installed inside the virtual environment. To run your Scheme code
|
||||
use either scheme-script or scheme-compile, executables.
|
||||
they will be installed inside the virtual environment.
|
||||
|
||||
### bin/snow-chibi
|
||||
|
||||
R6RS:
|
||||
Install R7RS package from [snow-fort.org](https://snow-fort.org).
|
||||
|
||||
akku install chez-srfi
|
||||
scheme-script main.sps
|
||||
scheme-compile main.sps
|
||||
./main
|
||||
### bin/akku
|
||||
|
||||
R7RS:
|
||||
Install R6RS package from [akkuscm.org](https://akkuscm.org).
|
||||
|
||||
snow-chibi install srfi.64
|
||||
scheme-script main.scm
|
||||
scheme-compile main.scm
|
||||
./main
|
||||
### bin/scheme-script
|
||||
|
||||
Run Scheme script.
|
||||
|
||||
## Implementation specific notes
|
||||
### bin/scheme-compile
|
||||
|
||||
### Chicken
|
||||
Compile Scheme code to executable.
|
||||
|
||||
- Before compilation the directory is changed to be venv/lib so libraries will be found
|
||||
- venv/include
|
||||
- added into include paths
|
||||
- venv/lib
|
||||
- added into library paths
|
||||
- venv/scheme-compile
|
||||
- Environment variable VENV\_CSC\_ARGS is added to csc arguments
|
||||
### bin/docker-build
|
||||
|
||||
Build docker venvs docker image. Run this before docker-run or docker-repl.
|
||||
|
||||
### bin/docker-run
|
||||
|
||||
Run command inside venv inside docker.
|
||||
|
||||
### bin/docker-repl
|
||||
|
||||
Run scheme repl inside venv inside docker.
|
||||
|
||||
## Supported impelmentations and notes
|
||||
|
||||
### R6RS
|
||||
|
||||
- Capyscheme
|
||||
- Chezscheme
|
||||
- Guile
|
||||
- Ikarus
|
||||
- Ironscheme
|
||||
- Larceny
|
||||
- Loko
|
||||
- Mosh
|
||||
- Racket
|
||||
- Sagittarius
|
||||
- Ypsilon
|
||||
|
||||
### R7RS
|
||||
|
||||
- Capyscheme
|
||||
- Chibi
|
||||
- Chicken
|
||||
- Before compilation the directory is changed to be venv/lib so libraries will be found
|
||||
- venv/include
|
||||
- added into include paths
|
||||
- venv/lib
|
||||
- added into library paths
|
||||
- venv/scheme-compile
|
||||
- Environment variable VENV\_CSC\_ARGS is added to csc arguments
|
||||
- Cyclone
|
||||
- Foment
|
||||
- Gambit
|
||||
- Gauche
|
||||
- Guile
|
||||
- Kawa
|
||||
- Larceny
|
||||
- Loko
|
||||
- Meevax
|
||||
- MIT-Scheme
|
||||
- Mosh
|
||||
- Racket
|
||||
- Sagittarius
|
||||
- Skint
|
||||
- STklos
|
||||
- tr7
|
||||
- Ypsilon
|
||||
|
|
|
|||
47
scheme-venv
47
scheme-venv
|
|
@ -380,4 +380,51 @@ EOF
|
|||
} > "${venvpath}/bin/scheme-venv-info"
|
||||
chmod +x "${venvpath}/bin/scheme-venv-info"
|
||||
|
||||
## /bin/Dockerfile
|
||||
{
|
||||
cat << EOF
|
||||
FROM docker.io/schemers/${implementation}:head
|
||||
RUN apt-get update && apt-get install -y git make ca-certificates wget xz-utils gcc
|
||||
WORKDIR /build
|
||||
RUN git clone https://codeberg.org/retropikzel/scheme-venv.git --depth=1
|
||||
RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1
|
||||
RUN wget https://gitlab.com/-/project/6808260/uploads/094ce726ce3c6cf8c14560f1e31aaea0/akku-1.1.0.amd64-linux.tar.xz && tar -xf akku-1.1.0.amd64-linux.tar.xz && mv akku-1.1.0.amd64-linux akku
|
||||
WORKDIR /build/chibi-scheme
|
||||
RUN make
|
||||
RUN make install
|
||||
WORKDIR /build/akku
|
||||
RUN bash install.sh
|
||||
ENV PATH=/root/.local/bin:\${PATH}
|
||||
ENV PATH=${venvpath}/bin:\${PATH}
|
||||
WORKDIR ${venvpath}
|
||||
EOF
|
||||
} > "${venvpath}/etc/Dockerfile"
|
||||
|
||||
## /bin/docker-build
|
||||
{
|
||||
cat << EOF
|
||||
#!/bin/sh
|
||||
docker build -f ${venvpath}/etc/Dockerfile --tag ${venvname}-${implementation}-${rnrs}-docker-img ${venvpath}
|
||||
EOF
|
||||
} > "${venvpath}/bin/docker-build"
|
||||
chmod +x "${venvpath}/bin/docker-build"
|
||||
|
||||
## /bin/docker-run
|
||||
{
|
||||
cat << EOF
|
||||
#!/bin/sh
|
||||
docker run -v "${venvpath}:${venvpath}" -w "${venvpath}" ${venvname}-${implementation}-${rnrs}-docker-img "\$@"
|
||||
EOF
|
||||
} > "${venvpath}/bin/docker-run"
|
||||
chmod +x "${venvpath}/bin/docker-run"
|
||||
|
||||
## /bin/docker-repl
|
||||
{
|
||||
cat << EOF
|
||||
#!/bin/sh
|
||||
docker run -it -v "${venvpath}:${venvpath}" -w "${venvpath}" ${venvname}-${implementation}-${rnrs}-docker-img scheme-repl
|
||||
EOF
|
||||
} > "${venvpath}/bin/docker-repl"
|
||||
chmod +x "${venvpath}/bin/docker-repl"
|
||||
|
||||
echo "Initialized scheme-venv ${venvpath}, with ${implementation} and ${rnrs}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue