Reputation: 63399
The installation instructions at the Stackage web site describe how to use it for one project.
Is there a way how to configure Stackage to be the default for all users and install packages globally available to them?
Upvotes: 3
Views: 131
Reputation: 739
AFAIK cabal does not support a global config file. But even that won't help by itself because afaict, you can't disable configured remote-repo
s anyway.
So I see two approaches with obvious drawbacks.
Install a /etc/skel/.cabal/config
file that will be copied to new user accounts. That won't help with older users though.
Install a global alias (or shell script wrapper) with name cabal
that calls cabal --remote-repo=hackage.haskell.org:http://www.stackage.org/lts
.
Users can opt out by unalias
ing cabal or using the real cabal executable when using a shell script.
Users will be utterly confused though, because cabal will tell users it uses hackage, when in fact it is using stackage.
Upvotes: 1