Last active
June 7, 2018 16:07
-
-
Save aztecrex/09dfea04e9f74d6236e77460a496d996 to your computer and use it in GitHub Desktop.
How to build hackage server 0.5.1 on Ubuntu in AWS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Launch and log into a Ubuntu 16.04 instance in AWS | |
sudo apt-get update | |
sudo apt-get install -y gcc libgmp-dev libicu-dev zlib1g-dev libtinfo-dev libssl-dev | |
download='https://www.haskell.org/platform/download/8.2.2/haskell-platform-8.2.2-unknown-posix--core-x86_64.tar.gz' | |
wget "$download" -O platform.tgz | |
tar -xzvf platform.tgz | |
sudo ./install-haskell-platform.sh | |
cabal update | |
cabal --version | |
ghc --version | |
git clone https://github.com/haskell/hackage-server/ | |
cd hackage-server | |
# edit cabal.project and get rid of allow-newer field | |
sed -e 's/allow-newer/-- allow-newer/' -i cabal.project | |
time cabal new-build -j | |
host="actual-host.compute-1.amazonaws.com" | |
./dist-newstyle/build/x86_64-linux/ghc-8.2.2/hackage-server-0.5.1/c/hackage-server/build/hackage-server/hackage-server init --static-dir $(pwd)/datafiles | |
./dist-newstyle/build/x86_64-linux/ghc-8.2.2/hackage-server-0.5.1/c/hackage-server/build/hackage-server/hackage-server run --static-dir $(pwd)/datafiles --base-uri=http://${host}:8080/ --ip=0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment