how to install xmonad for group of users.

Hi, I have been trying to install xmonad (using cabal) for the past week for a group of users and having some issues with it. When I try to install it for myself it works just fine, but I when I try install it for a group of users, it gives me errors that some packages/modules are missing. I used the following cabal command:
cabal install --prefix=$PREFIX --build-log=/tmp/xmonad.log.3 xmonad (where my prefix is /net/tools/xmonad/0.10
I see the installation there, I can run it myself, but when another user goes about it running it from the same installation, it complains that some packages/modules missing. I noticed that my installation creates $HOME/.ghc directory where all the packages are registered. I think therefore, for another user it can't access my $HOME/.ghc and therefore fails. Is there a way to tell cabal installer to register the packages in the $PREFIX area? I am so new to ghc, I tried figuring it out, but I could not. I think if I can register the packages somewhere in the PREFIX (/net/tools/xmonad/0.10) area, then xmonad running for a different user(s) will be able to access the right packages, and that might fix this issue. thanks in advance.

You will need to ask cabal to use a different package database (and
your users will need to ask their cabal installations to also use that
database). The simplest way to do this is to simply add "--global" to
the install line; however, this may not work if you don't have root
access.
~d
Quoting Imam Toufique
Hi,
I have been trying to install xmonad (using cabal) for the past week for a group of users and having some issues with it. When I try to install it for myself it works just fine, but I when I try install it for a group of users, it gives me errors that some packages/modules are missing. I used the following cabal command:
cabal install --prefix=$PREFIX --build-log=/tmp/xmonad.log.3 xmonad (where my prefix is /net/tools/xmonad/0.10
I see the installation there, I can run it myself, but when another user goes about it running it from the same installation, it complains that some packages/modules missing. I noticed that my installation creates $HOME/.ghc directory where all the packages are registered. I think therefore, for another user it can't access my $HOME/.ghc and therefore fails. Is there a way to tell cabal installer to register the packages in the $PREFIX area? I am so new to ghc, I tried figuring it out, but I could not. I think if I can register the packages somewhere in the PREFIX (/net/tools/xmonad/0.10) area, then xmonad running for a different user(s) will be able to access the right packages, and that might fix this issue. thanks in advance.

On Wed, Apr 4, 2012 at 20:15, Imam Toufique
I have been trying to install xmonad (using cabal) for the past week for a group of users and having some issues with it. When I try to install it for myself it works just fine, but I when I try install it for a group of users, it gives me errors that some packages/modules are missing. I used the following cabal command:
cabal install --prefix=$PREFIX --build-log=/tmp/xmonad.log.3 xmonad (where my prefix is /net/tools/xmonad/0.10
There are two aspects to use of cabal-install: install location and registry information. Changing --prefix does not change the registry used; if you want to do a global install, you need to add the --global option so that the package is registered in the global database instead of the local one. (Note that --global will also change the default install location to the one ghc itself is installed in, which is /usr/local for the official Haskell Platform packages and /usr for most Linux distribution packages.) -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

thanks for replying everyone. is there a way to change the location of registry in a global installation?
________________________________ From: Brandon Allbery
To: Imam Toufique Cc: "xmonad@haskell.org" Sent: Wednesday, April 4, 2012 5:44 PM Subject: Re: [xmonad] how to install xmonad for group of users. On Wed, Apr 4, 2012 at 20:15, Imam Toufique
wrote: I have been trying to install xmonad (using cabal) for the past week for a group of users and having some issues with it. When I try to install it for myself it works just fine, but I when I try install it for a group of users, it gives me errors that some packages/modules are missing. I used the following cabal command:
cabal install --prefix=$PREFIX --build-log=/tmp/xmonad.log.3 xmonad (where my prefix is /net/tools/xmonad/0.10
There are two aspects to use of cabal-install: install location and registry information. Changing --prefix does not change the registry used; if you want to do a global install, you need to add the --global option so that the package is registered in the global database instead of the local one. (Note that --global will also change the default install location to the one ghc itself is installed in, which is /usr/local for the official Haskell Platform packages and /usr for most Linux distribution packages.)
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

Quoting Imam Toufique
thanks for replying everyone. is there a way to change the location of registry in a global installation?
Yes, use the --package-db option. Your users will need to tell GHC about this database as well when building their configs, and xmonad's builtin recompile/restart machinery will probably be broken. ~d
participants (3)
-
Brandon Allbery
-
Imam Toufique
-
wagnerdm@seas.upenn.edu