[Haskell-cafe] cabal --user question

Frederik Eaton frederik at a5.repetae.net
Sun Jul 10 20:19:10 EDT 2005

I forgot to say, when I run configure like

runghc Setup.hs configure --with-hc-pkg="ghc-pkg --user" --prefix=$HOME

and then run 'install', it exits with code 127 but displays no error
message. Maybe something to look into...


On Sun, Jul 10, 2005 at 05:00:13PM -0700, Frederik Eaton wrote:
> Thanks for the quick reply!
> > > How do I install a package in the user package.conf with cabal? It is
> > > not clear to me how to do this, looking at the output of 'configure
> > > --help'. There is an option "--user" to get dependencies from the user
> > > cabal file but this still, somewhat counterintuitively, tries to
> > > install the package in the global location (why would one want such
> > > behavior?). Specifying '--with-hc-pkg="ghc-pkg --user"' doesn't seem
> > > to work either, when I do this then 'install' and 'unregister'
> > > complete without error but apparently have no effect.
> > 
> > ./setup configure --user #if it depends on user-local packages
> > ./setup build
> > ./setup install --user
> Ah, I see.
> > Perhaps install --user should be the default if you configure --user.
> Yeah, it seems somewhat inconsistent - everything about the
> installation of a package is usually controlled by 'configure' options
> (e.g. in autoconf), even in cabal the prefix is still part of
> 'configure' but the other relevant installation parameter is specified
> as an option to 'install'...
> For one, it means that I can't just call "./setup unregister" to
> unregister my package, I have to remember which arguments I passed to
> 'register' or 'install'. It seems like a bad design to me. At the very
> least, I should be able to specify the default behavior (user or
> global) at configure time so that if I run these commands without
> arguments they behave in a way that is consistent with each other and
> with the package configuration.
> Is there a reason why there is no 'uninstall' command, by the way? It
> might be useful.
> Also, I would shorten the '--copy-prefix' argument to 'copy' to just
> '--prefix' unless there is a good reason for having it that way. The
> "copy-" part seems reduntant to me. That's my opinion.
> > The user's guide is here:
> > 
> > http://www.haskell.org/ghc/docs/latest/html/Cabal/
> Thanks,
> Frederik

More information about the Haskell-Cafe mailing list