37 lines
1.2 KiB
Docker
37 lines
1.2 KiB
Docker
ARG SCHEME=chibi
|
|
ARG IMAGE=${SCHEME}:head
|
|
FROM debian:trixie AS cache
|
|
RUN apt-get update && apt-get install -y git ca-certificates make gcc libffi-dev
|
|
RUN mkdir ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
|
|
WORKDIR /cache
|
|
RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1
|
|
RUN git clone https://codeberg.org/retropikzel/compile-r7rs.git --depth=1 --branch=silence
|
|
WORKDIR /cache/chibi-scheme
|
|
RUN make
|
|
RUN make install
|
|
WORKDIR /cache/compile-r7rs
|
|
RUN snow-chibi install --always-yes "(foreign c)"
|
|
RUN snow-chibi install --always-yes "(srfi 170)"
|
|
RUN make build-chibi
|
|
|
|
ARG SCHEME=chibi
|
|
ARG IMAGE=${SCHEME}:head
|
|
FROM schemers/${IMAGE}
|
|
RUN apt-get update && apt-get install -y make gcc libffi-dev
|
|
RUN mkdir ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
|
|
COPY --from=cache /cache /cache
|
|
COPY --from=cache /usr/local/share/snow /usr/local/share/snow
|
|
COPY --from=cache /usr/local/lib/snow /usr/local/lib/snow
|
|
ARG SCHEME=chibi
|
|
WORKDIR /cache/compile-r7rs
|
|
RUN make install
|
|
WORKDIR /cache/chibi-scheme
|
|
RUN make install
|
|
WORKDIR /
|
|
RUN snow-chibi install --impls=${SCHEME} --always-yes "(srfi 64)"
|
|
RUN snow-chibi install --impls=${SCHEME} --always-yes "(foreign c)"
|
|
WORKDIR /workdir
|
|
COPY Makefile .
|
|
COPY retropikzel retropikzel/
|
|
|