Skip to content

Instantly share code, notes, and snippets.

@jasonreich
Created January 18, 2011 23:54
Show Gist options
  • Save jasonreich/785408 to your computer and use it in GitHub Desktop.
Save jasonreich/785408 to your computer and use it in GitHub Desktop.
Using Capri to sandbox a dev Agda installation
# Install the capri sandboxing tool.
cabal install capri
# Download Agda to a directory of your choice.
darcs get --lazy "http://code.haskell.org/Agda"
# Enter the directory. Make sure you `cabal clean` if you
# try this more than once.
cd Agda
# Get in the initial packages.
capri bootstrap
# And some extras required to register the ghc package.
capri clone array bytestring containers filepath old-locale
capri clone old-time unix directory hpc process pretty
capri clone template-haskell syb
# For some reason, `capri clone` doesn't work with Cabal so
# you've got to do it manually. Locate your package.conf.d
# directory using `ghc-pkg list` and use tab completion to
# find the appropriate Cabal file. In my case...
capri ghc-pkg -- register /usr/local/pkg/ghc-6.12.1-i686-1/\
lib/ghc-6.12.1/package.conf.d/\
Cabal-1.8.0.2-bc92fe595a99db06fca8c2eb712108b4.conf
# Now we can finish cloning ghc.
capri clone ghc-binary bin-package-db ghc
# Easier to install a fresh version of haskell98.
capri cabal -- install haskell98-1.0.1.1
# Install the actual package.
capri install
# Link the capri build of `agda-mode` into your path.
ln -s `pwd`/.capri/install/bin/agda-mode ~/.cabal/bin/agda-mode
# Setup your .emacs using their tool.
agda-mode setup
# Finally whenever you run emacs, make sure you use the
# right environment by doing...
export GHC_PACKAGE_PATH=`pwd`/.capri/packages
emacs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment