-
Notifications
You must be signed in to change notification settings - Fork 710
Cabal Dir Environment variable added #1126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…g CABAL_DIR to your environment.
If I'm allowed to bikeshed a bit I think these kind of variables are usually called |
Can someone comment on why this is needed? It seems to duplicate the existing env var to specify which ~/.cabal/config file to read. Perhaps what we need is the ability to have dirs in the ~/.cabal/config file that are relative to its location, so you can use the same file and relocate it without changing anything. |
Here is one use cases I can think of: At the university we have everyone's home directories mounted on NFS. And the machines are a mix of i686 and x86-64. (If this was 1995 there would be Alphas and SGIs and SPARCs...) I'm not sure this is a thing, but it would be ideal if Cabal is aware of architectures and could let people install packages for different architectures side-by-side. (GHC seems to have some notion of machine type-compiler version, so why not Cabal?) (I'm fairly clueless and I'm not sure there's an existing elegant way to solve this. I found this thread when looking for a way to run Xmonad on the above-stated i686 machines.) |
@sajith I think your problem was fixed by recent cross-compiling-related changes (packages are now installed under |
What if instead of adding
? |
Or perhaps we just need a general "where cabal puts its misc other files" entry in the config. And we'd use that for the things that don't have another specific entry in the ~/.cabal/config. Indeed we could remove some of the other config entries like |
Closing in favor of #1242. |
This enhancement would have been appreciated. |
I adjusted the defaultCabalDir function so that if you have CABAL_DIR environment variable it will default to that location instead of $HOME/.cabal