Skip to content

Instantly share code, notes, and snippets.

@andy-morris
Created March 5, 2013 13: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 andy-morris/5090155 to your computer and use it in GitHub Desktop.
Save andy-morris/5090155 to your computer and use it in GitHub Desktop.
Cabal + stow = magic
#!/usr/bin/env zsh
cd $STOW_DIR
if [[ -a $1 ]]; then
echo "$1 already exists in stowland!"
exit 1
fi
mkdir $1
cd $1
mkdir links
ghc-pkg init ghc
cabal install --one-shot --prefix=$PWD --package-db=$PWD/ghc \
--symlink-bindir=$PWD/links --disable-tests --disable-executable-dynamic \
--disable-library-profiling --disable-executable-profiling \
--disable-documentation $@
rm -rf links ghc doc lib
stow $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment