@@ -10,23 +10,29 @@
10# instructions, see:
10# instructions, see:
11# http://www.stackage.org/install
11# http://www.stackage.org/install
13−set -exu
13+set -exuo pipefail
15mkdir /home/stackage -p
15mkdir /home/stackage -p
17export DEBIAN_FRONTEND=noninteractive
17export DEBIAN_FRONTEND=noninteractive
21+apt-get install -y curl
24+curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
25+stack setup --resolver ghc-$GHCVER
18apt-get update
27apt-get update
19apt-get install -y software-properties-common
28apt-get install -y software-properties-common
21−add-apt-repository ppa:hvr/ghc -y
22add-apt-repository -y ppa:marutter/rrutter
30add-apt-repository -y ppa:marutter/rrutter
23apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
31apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
24add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy main'
32add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy main'
25add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main'
33add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main'
26add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main'
34add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main'
30apt-get update
36apt-get update
31apt-get install -y \
37apt-get install -y \
32 apt-transport-https \
38 apt-transport-https \
@@ -38,10 +44,6 @@ apt-get install -y \
43− ghc-$GHCVER-htmldocs \
@@ -164,11 +166,6 @@ ACCEPT_EULA=Y apt-get install msodbcsql17 -y
165locale-gen en_US.UTF-8
167locale-gen en_US.UTF-8
167−curl -sSL https://get.haskellstack.org/ | sh
169−# Put documentation where we expect it
170−mv /opt/ghc/$GHCVER/share/doc/ghc-$GHCVER/ /opt/ghc/$GHCVER/share/doc/ghc
172# llvm-5.0 for GHC (separate since it needs wget)
169# llvm-5.0 for GHC (separate since it needs wget)
173wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
170wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
174 && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" \
171 && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" \
@@ -304,3 +301,7 @@ export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-3.9/include;
304# finally run:
301# finally run:
306# EOF: don't build anything below this line
303# EOF: don't build anything below this line
307+rm -rf /var/lib/apt/lists/*