3.14 pre-flight checks: bump dependencies (#10244)
[cabal.git] / .docker / validate.dockerfile.zinza
blobc2c172413091b71c41c940cc9fcfead1d9ae1517
1 FROM    phadej/ghc:{{ image }}
3 # Install cabal-plan
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
11 # Install cabal-env
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
18 {% if needsDynamic %}
19 # We need newer compiler, to install cabal-plan
20 RUN     apt-get update
21 RUN     apt-get install -y {{ ghc }}-dyn
22 {% endif %}
24 # Update index
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 \
33           Cabal \
34           aeson \
35           async \
36           base-compat \
37           base16-bytestring \
38           base64-bytestring \
39           cryptohash-sha256 \
40           Diff \
41           echo \
42           ed25519 \
43           edit-distance \
44           HTTP \
45           lukko \
46           network \
47           optparse-applicative \
48           pretty-show \
49           regex-compat-tdfa \
50           regex-posix \
51           regex-tdfa \
52           rere \
53           statistics \
54           tar \
55           tasty \
56           tasty-golden \
57           tasty-hunit \
58           tasty-quickcheck \
59           tree-diff \
60           void \
61           zlib \
62 {% if client %}
63           resolv \
64 {% endif %}
65 {% if parsecCompat %}
66           parsec \
67           text   \
68 {% endif %}
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" \
83 {% endif %}
84         && rm -rf $HOME/.ghc
86 # Validate
87 WORKDIR /build
88 COPY    . /build
89 RUN     sh ./validate.sh {{ args }} -w {{ ghc }} -v