@@ -10,23 +10,29 @@
1010# instructions, see:
1111# http://www.stackage.org/install
1212
13−set -exu
13+set -exuo pipefail
1414
1515mkdir /home/stackage -p
1616
1717export DEBIAN_FRONTEND=noninteractive
18+
19+# Get curl
20+apt-get update
21+apt-get install -y curl
22+
23+# Get Stack and GHC
24+curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
25+stack setup --resolver ghc-$GHCVER
26+
1827apt-get update
1928apt-get install -y software-properties-common
2029
21−add-apt-repository ppa:hvr/ghc -y
2230add-apt-repository -y ppa:marutter/rrutter
2331apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
2432add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy main'
2533add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main'
2634add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main'
2735
28−GHCVER=8.6.3
29−
3036apt-get update
3137apt-get install -y \
3238 apt-transport-https \
@@ -38,10 +44,6 @@ apt-get install -y \
3844 fsharp \
3945 g++ \
4046 gawk \
41− ghc-$GHCVER \
42− ghc-$GHCVER-dyn \
43− ghc-$GHCVER-htmldocs \
44− ghc-$GHCVER-prof \
4547 git \
4648 gnupg \
4749 gradle \
@@ -164,11 +166,6 @@ ACCEPT_EULA=Y apt-get install msodbcsql17 -y
164166
165167locale-gen en_US.UTF-8
166168
167−curl -sSL https://get.haskellstack.org/ | sh
168−
169−# Put documentation where we expect it
170−mv /opt/ghc/$GHCVER/share/doc/ghc-$GHCVER/ /opt/ghc/$GHCVER/share/doc/ghc
171−
172169# llvm-5.0 for GHC (separate since it needs wget)
173170wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
174171 && 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;
304301# finally run:
305302ldconfig
306303# EOF: don't build anything below this line
304+
305+# Cleanup
306+apt-get clean
307+rm -rf /var/lib/apt/lists/*