forked from commercialhaskell/stackage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debian-bootstrap.sh
executable file
·124 lines (112 loc) · 2.84 KB
/
debian-bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/usr/bin/env bash
# Work in progress: create a list of commands necessary to get Stackage
# up-and-running on a freshly installed Debian-based system (including Ubuntu).
# Quick start:
# wget -O - https://raw.github.com/fpco/stackage/master/debian-bootstrap.sh | bash -ex
# NOTE: Requires that GHC and Cabal are installed and on your PATH. For
# instructions, see:
# http://www.stackage.org/install
set -exu
mkdir /home/stackage -p
locale-gen en_US.UTF-8
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:hvr/ghc -y
add-apt-repository -y ppa:marutter/rrutter
# not sure what this was needed for
#add-apt-repository -y ppa:openstack-ubuntu-testing/icehouse
# Set the GHC version
GHCVER=8.0.1
# Get Stack
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 575159689BEFB442
echo 'deb http://download.fpcomplete.com/ubuntu xenial main'|tee /etc/apt/sources.list.d/fpco.list
apt-get update
apt-get install -y \
build-essential \
ghc-$GHCVER \
ghc-$GHCVER-htmldocs \
hscolour \
sudo \
curl \
freeglut3-dev \
git \
libadns1-dev \
libasound2-dev \
libblas-dev \
libbz2-dev \
libcairo2-dev \
libcurl4-openssl-dev \
libdevil-dev \
libedit-dev \
libedit2 \
libfftw3-dev \
libfreenect-dev \
libgd2-xpm-dev \
libgeoip-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libglu1-mesa-dev \
libgmp3-dev \
libgnutls-dev \
libgsasl7-dev \
libgsl0-dev \
libgtk-3-dev \
libgtk2.0-dev \
libgtksourceview-3.0-dev \
libhidapi-dev \
libicu-dev \
libjudy-dev \
liblapack-dev \
libleveldb-dev \
liblzma-dev \
libmagic-dev \
libmagickcore-dev \
libmagickwand-dev \
libmarkdown2-dev \
libmysqlclient-dev \
libncurses-dev \
libnotify-dev \
libopenal-dev \
libpango1.0-dev \
libpcap0.8-dev \
libpq-dev \
libsdl2-dev \
libsnappy-dev \
libsndfile1-dev \
libsqlite3-dev \
libssl-dev \
libsystemd-dev \
libtagc0-dev \
libtre-dev \
libudev-dev \
libusb-1.0-0-dev \
libwebkitgtk-3.0-dev \
libxau-dev \
libxml2-dev \
libxrandr-dev \
libxss-dev \
libyaml-dev \
libzip-dev \
libzmq3-dev \
llvm \
m4 \
nettle-dev \
nodejs \
npm \
openjdk-8-jdk \
r-base \
r-base-dev \
ruby-dev \
stack \
wget \
xclip \
zip \
zlib1g-dev
# Put documentation where we expect it
mv /opt/ghc/$GHCVER/share/doc/ghc-$GHCVER/ /opt/ghc/$GHCVER/share/doc/ghc
# Buggy versions of ld.bfd fail to link some Haskell packages:
# https://sourceware.org/bugzilla/show_bug.cgi?id=17689. Gold is
# faster anyways and uses less RAM.
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10