Dear devs
I have thirty or so builds of GHC on my disk. Sometimes I want to use one build to build and install (for that build alone) a bunch of libraries. If I do
cabal install hspec -w $HOME/code/HEAD-22/_build/stage1/bin/ghc
then Cabal rightly warns me
Warning: The libraries were installed by creating a global GHC environment
file at:
/home/simonpj/.ghc/x86_64-linux-9.15.20260309/environments/default
The presence of such an environment file is likely to confuse or break other
tools because it changes GHC's behaviour: it changes the default package set
in ghc and ghci from its normal value (which is "all boot libraries"). GHC
environment files are little-used and often not tested for.
Question: how can I install the libraries in the build tree for $HOME/code/HEAD-22?
After all, I think ghc-internal, base etc are all in that build-tree. Surely hspec can be too?
But how?
Thanks!
Simon