I have a project in a Cabal sandbox. There is a package I would like to use but the one on Hackage isn't suitable. There is an alternative dev branch that should meet my needs that the author has on Github. I've previously installed dev branches without a sandbox by using:
$ runhaskell Setup.hs configure --user
$ runhaskell Setup.hs build
$ runhaskell Setup.hs install
Obviously that's not going to work if I only want this repo installed in the sandbox.
My directory structure is set up like this:
../MyProject
../MyProject/.cabal-sandbox
../MyProject/exec/Main.hs
../MyProject/src/MyProject.hs
../MyProject/MyProject.cabal
There's both an executable and a library. My build-depends has about 18 package dependencies, of which this is one. So my questions:
Reproducing the correct answer as community-wiki from the comments:
Try cabal sandbox add-source
. See coldwa.st/e/blog/2013-08-20-Cabal-sandbox.html for an example.