Monday 17 June 2013

Reusing a cabal-dev sanboxed build environment

If you're installing many cabal packages from the same project, such as the clckwrks code base, and you're using sand-boxed builds, it's quicker to install the main package and then reuse the same sandbox environment.

If all the packages have the same dependencies then you can simple tell cabal-dev to use the same sanbox with the -s or --sandbox switch.

Remembering that the default directory for a cabal-dev sandbox is <package-dir>/cabal-dev, installing clckwrks can become as simple as cabal-dev install -s../clckwrks/cabal-dev.

Installing clckwrks on Ubuntu 12.04

You can't just checkout the clckwrks code from hub.darcs.net and expect it to compile straight away.

To install the clckwrks Cabal package I found I needed to install the following extra system packages, (on top of the standard GHC packaged with Ubuntu):

libghc-hsx-dev, libcrypto++-dev, happy

Of course there could be more, and this should be tested on a clean install (or sandbox, aynone?) if the goal is to turn clckwrks into an Ubuntu package.

Edit:

To install the cabal package clckwrks-cli you will also need the Ubuntu package lib32ncurses5-dev.