Last active
April 17, 2019 00:12
-
-
Save vmchale/5092a7785c08f69b41c9b35c09e405df to your computer and use it in GitHub Desktop.
This is the bash script I use to install GHCJS (8.6) on Linux
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
#!/usr/bin/env bash | |
# forked from Moritz Angerman https://github.com/angerman/haskell-to-web/blob/master/ghcjs-build-notes.org | |
set -e pipefail | |
cabal new-install happy --overwrite-policy=always | |
cabal new-install alex --overwrite-policy=always | |
cabal new-install hscolour --overwrite-policy=always | |
cabal new-install hsc2hs --overwrite-policy=always | |
rm -rf "$HOME/.ghcjs" | |
mkdir -p "$HOME/.ghcjs" | |
cd "$HOME/.ghcjs" | |
git clone --branch ghc-8.6 https://github.com/ghcjs/ghcjs.git | |
cd ghcjs | |
git submodule update --init --recursive | |
./utils/makePackages.sh | |
cabal new-build | |
mkdir bin | |
(cd bin && for a in ghcjs ghcjs-pkg ghcjs-run haddock-ghcjs hsc2hs-ghcjs ghcjs-boot; do ln -s ../utils/dist-newstyle-wrapper.sh $a; done) | |
export PATH=$(pwd)/bin:$PATH | |
ghcjs-boot -s data/boot.tar --no-haddock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment