Skip to content

Instantly share code, notes, and snippets.

@tomsmeding
Created August 21, 2020 15:52
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 tomsmeding/8488d5ce89b4f50b9bdf9026aef971ad to your computer and use it in GitHub Desktop.
Save tomsmeding/8488d5ce89b4f50b9bdf9026aef971ad to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Written by Tom Smeding, released into the public domain.
# This produces the following directory structure:
# - $EXT/
# - stack/
# - stack # haskell stack executable
# - IHaskell/ # the IHaskell github repository clone
# - ihaskell # the ihaskell executable
EXT=/ih
set -euo pipefail
apt-get install libz-dev pkg-config libzmq3-dev
mkdir -p $EXT
cd $EXT
mkdir stack
pushd stack
curl -LO https://get.haskellstack.org/stable/linux-x86_64.tar.gz
tar xf linux-x86_64.tar.gz
cp stack-*/stack .
rm -rf stack-*
rm linux-x86_64.tar.gz
popd
git clone https://github.com/gibiansky/IHaskell
pushd IHaskell
rm stack.yaml
ln -s stack-8.8.yaml stack.yaml
$EXT/stack/stack build
$EXT/stack/stack install
cp ~/.local/bin/ihaskell $EXT/
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment