We have sandboxes now, which (I think) weren't there 2 yrs ago.
Try this:
$ mkdir hse # Directory for Haskell school of expression
$ cd hse
$ cabal sandbox init # Create a new sandbox
$ cabal install gtk2hs-buildtools # Install gtk2hs-buildtools inside sandbox
$ export PATH=".cabal-sandbox/bin:$PATH" # Add the binaries installed in (current directory's) sandbox to $PATH
$ cabal install gtk # Install gtk (and anything else you need)
The above works in my case. Also, if you have a lot of packages installed in "~/.cabal", then I recommend that you remove them and install them in sandboxes where they are actually required.
Manually, you'd do it as follows:
$ mv ~/.cabal/packages ~/temporary_package_storage # Long name to avoid clash, save downloaded package sources
$ rm -rf ~/.ghc ~/.cabal # Remove all packages, and ghc's knowledge of them
$ mkdir ~/.cabal # Make a new ~/.cabal directory
$ mv ~/temporary_package_storage ~/.cabal/packages # Reinsert the saved downloaded package sources
Also, after some time it becomes natural to deal with cabal.
For example, I have that export line in my .zshrc. Thus the sandbox residing in current directory is always in my path.
Also, a shell function that you may want to use.
cabal-reset () {
if [[ ! -d ~/.cabal-packages ]] ; then # If backup does not exist
mv ~/.cabal/packages ~/.cabal-packages # Make a backup
fi
rm -rf ~/.ghc ~/.cabal # Nuke everything
mkdir ~/.cabal # Create new ~/.cabal
ln -s ~/.cabal-packages ~/.cabal/packages # Symlink backup to ~/.cabal/packages
}
Hope this helps.