Skip to content

Commit 63039a2

Browse files
committed
Do install manuall on aarch64.
1 parent bbf3bda commit 63039a2

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

ghc-9.8.2/Dockerfile

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,37 @@ RUN apk --no-cache add binutils-gold curl gcc g++ git gmp-dev ncurses-dev ncurse
1111
# Install system deps for FOSSA CLI:
1212
RUN apk --no-cache add bash xz-libs xz-dev bzip2-dev bzip2-static upx curl jq
1313

14-
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1
15-
ENV BOOTSTRAP_HASKELL_MINIMAL=1
14+
ENV GHC_VERSION="9.8.2"
15+
1616
ENV PATH="/root/.cabal/bin:/root/.ghcup/bin:$PATH"
17-
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
1817

19-
RUN ghcup install ghc 9.8.2
18+
RUN <<EOF
19+
if [ $(uname -m) != "aarch64" ] ; then
20+
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
21+
export BOOTSTRAP_HASKELL_MINIMAL=1
22+
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
23+
24+
ghcup install ghc "$GHC_VERSION"
25+
ghcup set ghc "$GHC_VERSION"
26+
else
27+
mkdir /tmp/ghc
28+
curl "https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-aarch64-alpine3_18-linux.tar.xz" | tar --strip-components=1 -xJC /tmp/ghc
29+
cd /tmp/ghc
30+
./configure --prefix="$HOME/.ghcup" && make install && rm -rf /tmp/ghc
31+
fi
32+
EOF
33+
34+
# Install cabal
35+
RUN <<EOF
36+
if [ $(uname -m) != "aarch64" ] ; then
37+
ghcup install cabal 3.10.3.0
38+
else
39+
curl https://downloads.haskell.org/~cabal/cabal-install-3.12.1.0/cabal-install-3.12.1.0-aarch64-linux-alpine3_18.tar.xz | tar -xJC "$HOME/.ghcup/bin/"
40+
chmod 755 "$HOME/.ghcup/bin/cabal"
41+
rm "$HOME/.ghcup/bin/plan.json"
42+
fi
43+
EOF
2044

21-
RUN ghcup set ghc 9.8.2
22-
RUN ghcup install cabal 3.10.3.0
2345

2446
# Sets USER environment to overcome issue, as described in:
2547
# https://github.com/cachix/install-nix-action/issues/122

0 commit comments

Comments
 (0)