[Haskell-cafe] GHC 6.10.1 and cabal[-install]
duncan.coutts at worc.ox.ac.uk
Thu Nov 20 06:03:12 EST 2008
On Wed, 2008-11-19 at 10:28 +0100, Wolfgang Jeltsch wrote:
> Am Dienstag, 18. November 2008 22:24 schrieben Sie:
> > > > How do I install and configure it so that it is integrated best with
> > > > GHC 6.10.1? For example, should cabal use some directory in the GHC
> > > > tree to place compiled packages in?
> > The defaults for user or global should be fine. There is no need to put
> > additional packages into the ghc install tree, indeed I would recommend
> > against doing that.
> Hmm, /usr/local is not so fine for me since it makes packages hard(er) to
> uninstall. I use stow (<http://www.gnu.org/software/stow/>).
No problem. It's only a default, the same default as ./configure systems
use. Like ./configure it accepts all the usual --prefix= --libdir=
--bindir etc flags, again with more-or-less the same relationships
between them. It's documented in the Cabal user guide.
> > > Cabal wants to place package info in $HOME/.cabal. However, I want to
> > > install packages globally with sudo. So I want to have a global package
> > > cache. Is there a common directory to be used for that or is
> > > cabal[-install] only for per-user installations?
> > It can do per-user or global. Per-user is the default.
> > If you want to do the build as user and just the install as root then
> > you can use the --global --root-cmd=sudo options. If you want to use
> > this every time then you can set that in the ~/.cabal/config file.
> I want the package cache etc. global. The problem is that with sudo, cabal
> still uses $HOME/.cabal where $HOME is the home directory of the ordinary
> user (not the one of root).
If you want the package cache to be global then run it as root. Or edit
your ~/.cabal/config to use a global shared dir for the package cache
> Does --global change the directory for cabal configuration and the package
> cache to something different than $HOME/.cabal?
No. But the ~/.cabal/config does specify the location of the package
cache so you can make that a global dir.
Perhaps I should ask what you're really trying to do, to see if there's
some way we could support your use-case better. Do you have multiple
users and you want to save disk space by sharing the package download
Perhaps we could put some recipe on how to integrate with stow on the
Cabal wiki page.
> > The cabal user guide lists the default install directories for global
> > and user installs.
> Okay, I looked at the cabal-install docs. And the only doc seems to be the
> output of cabal with the --help option.
Pretty much all the stuff in the Cabal user guide applies to the cabal
command line tool. There is some extra stuff in the cabal command line
tool that is not yet adequately documented (ie only in --help).
More information about the Haskell-Cafe