Last active
June 9, 2021 16:46
-
-
Save dgellow/680c15b727e2b56ff5c65a83e788ac65 to your computer and use it in GitHub Desktop.
Idris2 dockerfile to target Game Boy Advance arch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# GBA development kit | |
# | |
FROM devkitpro/devkitarm:latest as devkit | |
# | |
# Idris build process | |
# | |
FROM dgellow/idris2:v0.3.0 as base | |
# setup dependencies | |
COPY --from=devkit /opt/devkitpro/devkitARM /opt/devkitpro/devkitARM | |
RUN apt-get update && apt-get -y install build-essential git clang | |
# fetch idris sources | |
ARG GIT_TAG=GBA | |
WORKDIR /src | |
RUN git clone https://github.com/andrevidela/Idris2.git | |
WORKDIR /src/Idris2 | |
RUN git checkout ${GIT_TAG} | |
# build idris | |
ENV SCHEME=scheme | |
ENV DEVKITARM /opt/devkitpro/devkitARM | |
ENV CC $(DEVKITARM)/bin/arm-none-eabi-gcc | |
RUN export PATH="${PATH}:/root/.idris2/bin" && make all && make install PREFIX=/idris_gba | |
# | |
# Naked image | |
# | |
FROM ubuntu | |
COPY --from=base /idris_gba /root/.idris2 | |
ENV SCHEME=scheme | |
RUN apt-get update && apt-get -y install chezscheme | |
RUN echo 'export PATH="/root/.idris2/bin/:${PATH}"' >> "${HOME}/.bashrc" && echo 'alias idris=idris2' >> "${HOME}/.bashrc" | |
ENTRYPOINT ["/root/.idris2/bin/idris2"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment