ghcup-hs/.gitlab/before_script/linux/alpine/install_deps.sh

59 lines
910 B
Bash
Raw Normal View History

2020-04-19 15:00:05 +00:00
#!/bin/sh
set -eux
2020-04-19 17:23:54 +00:00
. "$( cd "$(dirname "$0")" ; pwd -P )/../../../ghcup_env"
2020-05-01 14:27:27 +00:00
mkdir -p "${TMPDIR}"
2020-04-19 15:00:05 +00:00
apk add --no-cache \
curl \
gcc \
g++ \
2021-02-24 14:19:29 +00:00
binutils \
binutils-gold \
bsd-compat-headers \
2020-04-19 15:00:05 +00:00
gmp-dev \
ncurses-dev \
libffi-dev \
make \
xz \
tar \
2020-04-19 17:23:54 +00:00
perl
2021-02-24 14:19:29 +00:00
if [ "${ARCH}" = "32" ] ; then
2020-07-13 20:34:38 +00:00
curl -sSfL https://downloads.haskell.org/ghcup/i386-linux-ghcup > ./ghcup-bin
2020-04-19 17:23:54 +00:00
else
2020-07-13 20:34:38 +00:00
curl -sSfL https://downloads.haskell.org/ghcup/x86_64-linux-ghcup > ./ghcup-bin
2020-04-19 17:23:54 +00:00
fi
chmod +x ghcup-bin
2021-02-20 22:03:44 +00:00
./ghcup-bin upgrade -i -f
2021-05-14 22:44:19 +00:00
./ghcup-bin install ${GHC_VERSION}
./ghcup-bin install-cabal ${CABAL_VERSION}
2020-04-19 15:00:05 +00:00
# utils
apk add --no-cache \
2020-04-27 19:55:35 +00:00
bash \
git
2020-04-19 15:00:05 +00:00
## Package specific
apk add --no-cache \
zlib \
zlib-dev \
zlib-static \
2021-05-14 21:09:45 +00:00
bzip2 \
bzip2-dev \
bzip2-static \
2020-04-19 15:00:05 +00:00
gmp \
gmp-dev \
openssl-dev \
openssl-libs-static \
xz \
2020-07-06 20:39:16 +00:00
xz-dev \
ncurses-static
2020-04-19 15:00:05 +00:00
2021-08-24 18:18:14 +00:00
if [ "${ARCH}" = "32" ] ; then
apk add --no-cache \
bsd-compat-headers
fi