[Haskell-cafe] separate cabal installations on separate machines

Duncan Coutts duncan.coutts at googlemail.com
Thu Nov 26 19:01:15 EST 2009


On Thu, 2009-11-26 at 10:37 -0800, Brian Denheyer wrote:
> Hello,
> 
> I have server where my home directory resides.
> 
> I use cabal from (at least) two machines with different processors
> (i386, powerpc) and the common home directory.
> 
> I noticed that there is a --global option which does the right thing
> and places the installs in /usr/local, but it looks like it still
> stores some info, particularly about configuration state, in
> /home/${USER}/.cabal.
> 
> How do I invoke cabal to make sure that the entire installation is
> machine specific ?

Presumably you just want the compiled installed packages to be separate
and it would be OK to share the configuration and the downloaded tarball
cache.

If so, then just configure the package installation path to use $arch,
like so:

install-dirs user
  prefix: /home/you/.cabal/$arch

This will then use either /home/you/.cabal/i386 or /ppc
under each you'll get a bin dir, lib etc.

If you care it's possible to be more cunning and share things like the
docs and data files between the arches.

For future reference, this is documented in the Cabal user guide (on the
cabal homepage).

Duncan



More information about the Haskell-Cafe mailing list