on master help sign in
Install GHC via Stack

PPA does not yet include GHC 8.6.4

commit034c6e928f30dcea3452a82fe4ece4c5c29b4b4c authorMichael Snoyman <michael@snoyman.com> dateWed 6 Mar 2019, 04:48 (8 years ago) parentd9c3f94
2 files changed+16−7
Dockerfile+2−1 debian-bootstrap.sh+14−6
Dockerfile+2−1
@@ -2,9 +2,10 @@ FROM fpco/pid1:16.04
22
33ENV HOME /home/stackage
44ENV LANG en_US.UTF-8
5+ENV GHCVER 8.6.4
56
67# NOTE: also update debian-bootstrap.sh when cuda version changes
7−ENV PATH /usr/local/cuda-10.0/bin:/opt/ghc/8.6.4/bin:/usr/sbin:/usr/bin:/sbin:/bin
8+ENV PATH /home/stackage/.stack/programs/x86_64-linux/ghc-$GHCVER/bin:/usr/local/cuda-10.0/bin:/usr/sbin:/usr/bin:/sbin:/bin
89ENV CUDA_PATH /usr/local/cuda-10.0
910ENV LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:/usr/local/cuda-10.0/nvvm/lib64
1011
debian-bootstrap.sh+14−6
@@ -10,11 +10,20 @@
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
@@ -164,11 +173,6 @@ ACCEPT_EULA=Y apt-get install msodbcsql17 -y
164173
165174locale-gen en_US.UTF-8
166175
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−
172176# llvm-5.0 for GHC (separate since it needs wget)
173177wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
174178 && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" \
@@ -304,3 +308,7 @@ export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-3.9/include;
304308# finally run:
305309ldconfig
306310# EOF: don't build anything below this line
311+
312+# Cleanup
313+apt-get clean
314+rm -rf /var/lib/apt/lists/*