Created
March 3, 2013 19:03
-
-
Save dmalikov/5077676 to your computer and use it in GitHub Desktop.
Small ghc-7.6.2 bootstrap
This file contains 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
#!/bin/bash | |
set -e | |
########################## | |
# INSTALL GHC | |
########################## | |
GHC="ghc.tar.bz2" | |
# install depends | |
sudo apt-get install --assume-yes libgmp3c2 | |
# prepare temp dir for ghc sources | |
mkdir --parents ghc | |
cd ghc | |
rm ./* --force --recursive | |
# download and unpack ghc sources | |
echo "Downloading ghc-7.6.2" | |
wget "http://www.haskell.org/ghc/dist/7.6.2/ghc-7.6.2-i386-unknown-linux.tar.bz2" --quiet --output-document=${GHC} | |
echo "Unpacking ghc-7.6.2" | |
tar --bzip2 --extract --file ${GHC} | |
# install ghc sources | |
cd ghc-7.6.2 | |
./configure | |
sudo make install | |
cd ../../ | |
########################## | |
# INSTALL CABAL | |
########################## | |
CABAL="cabal.tar.gz" | |
# install depends | |
sudo apt-get install --assume-yes libgmp-dev zlib1g-dev | |
mkdir --parents cabal && cd cabal | |
rm ./* --force --recursive | |
wget http://hackage.haskell.org/packages/archive/cabal-install/1.16.0.2/cabal-install-1.16.0.2.tar.gz --quiet --output-document=${CABAL} | |
tar --extract --file ${CABAL} | |
cd ./cabal-install-1.16.0.2 | |
bash ./bootstrap.sh | |
cd ../../ | |
# cabal installed into ~/.cabal/bin/cabal directory, so ~/.cabal/bin/ dir should be added to $PATH | |
CABAL_BIN=~/.cabal/bin/cabal | |
$CABAL_BIN update | |
sudo apt-get install gtk2hs-buildtools --assume-yes | |
$CABAL_BIN install containers directory filepath lens xml http-conduit regex-posix monad-control unordered-containers glib hashable hspec split aeson attoparsec stm QuickCheck --force-reinstalls | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment