1 FROM phadej/ghc:{{ image }}
4 RUN mkdir -p /root/.cabal/bin && \
5 curl -L https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz && \
6 echo "de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz" | sha256sum -c - && \
7 xz -d < cabal-plan.xz > /root/.cabal/bin/cabal-plan && \
8 rm -f cabal-plan.xz && \
9 chmod a+x /root/.cabal/bin/cabal-plan
12 RUN curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz && \
13 echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01 cabal-env.xz" | sha256sum -c - && \
14 xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env && \
15 rm -f cabal-env.xz && \
16 chmod a+x $HOME/.cabal/bin/cabal-env
19 # We need newer compiler, to install cabal-plan
21 RUN apt-get install -y {{ ghc }}-dyn
25 RUN cabal v2-update --index-state="2020-06-12T23:36:15Z"
27 # We install happy, so it's in the store; we (hopefully) don't use it directly.
28 RUN cabal v2-install happy --constraint 'happy ^>=1.19.12'
30 # Install some other dependencies
31 # Remove $HOME/.ghc so there aren't any environments
32 RUN cabal v2-install -w {{ ghc }} --lib \
47 optparse-applicative \
69 --constraint="rere -rere-cfg" \
70 --constraint="these -assoc" \
71 --constraint="bytestring installed" \
72 --constraint="binary installed" \
73 --constraint="containers installed" \
74 --constraint="deepseq installed" \
75 --constraint="directory installed" \
76 --constraint="filepath installed" \
77 --constraint="pretty installed" \
78 --constraint="process installed" \
79 --constraint="time installed" \
80 --constraint="unix installed" \
81 {% if hasTransformers %}
82 --constraint="transformers installed" \
89 RUN sh ./validate.sh {{ args }} -w {{ ghc }} -v