Skip to content

Instantly share code, notes, and snippets.

@TerrorJack
Created September 4, 2022 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TerrorJack/c7b3675f4fdc4de6a1a8f6aab09fa9fb to your computer and use it in GitHub Desktop.
Save TerrorJack/c7b3675f4fdc4de6a1a8f6aab09fa9fb to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euxo pipefail
export PATH=~/.cabal/bin:~/.ghcup/bin:$PATH
apt update
apt full-upgrade -y
apt install -y \
automake \
curl \
g++ \
git \
libgmp-dev \
libncurses-dev \
make \
python3-minimal \
xz-utils
mkdir -p ~/.ghcup/bin
curl -f -L --retry 5 https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup -o ~/.ghcup/bin/ghcup
chmod +x ~/.ghcup/bin/ghcup
ghcup install cabal 3.8.1.0
ghcup set cabal 3.8.1.0
ghcup install ghc 9.4.2 -u https://downloads.haskell.org/~ghc/9.4.2/ghc-9.4.2-x86_64-fedora33-linux.tar.xz
ghcup set ghc 9.4.2
cabal update
cabal install \
alex \
happy
git clone --recurse-submodules https://gitlab.haskell.org/ghc/ghc.git
cd ghc
sed -i '/index-state:/d' hadrian/cabal.project
./boot
./configure
XZ_OPT="-9 -T0" hadrian/build --flavour=perf+ipe --docs=none -j binary-dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment