cabal (./Setup.hs) options

Isaac Jones ijones at syntaxpolice.org
Wed Aug 9 12:29:43 EDT 2006


"Johan Tibell" <johan.tibell at gmail.com> writes:

> Before I start hacking on something I thought I'd do a little survey
> on the current state of affairs. There's a lot of different stuff "out
> there" and I'm a bit confused about the purpose of each:
>
> * Cabal
> * cabal-get (dead?)
> * cabal-install
> * cabal-put
> * Hackage
> * HackageDB
>
> I would appreciate if someone could give a short summary of each (with
> purpose). The picture I got this far is that Cabal is like make but
> with some extra information (.cabal file) attached so packages can be
> retrieved from HackageDB. Does this mean that Cabal/Hackage are a bit
> like Gentoo Portage which fetches and compiles sources? You can
> probably tell that I'm confused.

Good question!  I know this is confusing at the moment, as we're still
trying to nail it down, but I think we understand it now.  Lots of
this is in flux right now as we're trying to get together a version of
cabal-install (formerly cabal-get) that can actually be installed by a
mere mortal.  Ironically, we needed cabal-get to install cabal-get.
Bah!

Anyway, I put a summary of the current state of affiars on the wiki:
http://hackage.haskell.org/trac/hackage/wiki/WikiStart

Hackage is the name for this entire beautiful mess.

'''Hackage Components''':

 * Cabal: The library, command-line interface, and package description
   format for a single package.  Cabal is the lowest-level tool for
   Haskell package management.

 * cabal-setup: A convenience tool for installing a single cabal
   package.  This tool compiles the Setup.lhs script, if necessary, or
   if there is no Setup.lhs script, it acts like one.  This tool is
   part of the cabal source.

 * HackageDB: The database of Cabal-ized libraries.  Like CPAN for
   Haskell.  This is currently in flux, and so is not really online at
   the moment.

 * cabal-install: A tool for installing multiple cabal packages,
   including downloading packages from HackageDB and determining the
   dependencies among packages.  This tool is in development and not
   yet available except in the darcs distribution of cabal.  It is a
   part of the cabal source.

 * cabal-server-install: Not yet available.  A tool to be run on
   hackage.haskell.org for adding packages to HackageDB.

 * Other Tools

   * cabal-get: The old version of cabal-install, now defunct.

   * cabal-put: A client-side version of cabal-server-install;
     currently defunct. May be resurrected someday.

> - Do all these tools work with sources or is there such a thing a
> binary packaging?

There's not yet any sense of a binary package, but there's not any
particularly powerful reason for that.  We could immagine this
appearing some day if anyone actually wants it enough to implement.  I
think we should get the source stuff working first, though.

> - What handles dependencies?

Dependencies between packages are handled by cabal-install.
Dependnecies between modules are handled by ghc --make.  It would be
very nice to have this in cabal someday.

> - Is there some sort of installed packages DB already (which could
> be extended with uninstall information)?

Maybe the GHC package database (see ghc-pkg), but otherwise, no.
Maybe eventually cabal should take over this database functionality,
and ghc can ask cabal about packages, or something.

> - Are there any tools for making distribution specific (e.g. deb,
> rpm) packages?

Yes, quite a few.  There's one for debian: dh_make, one for rpm:
cabal2rpm, and one for gentoo, perhaps others.

peace,

  isaac



More information about the cabal-devel mailing list