|Version 22 (modified by guest, 4 years ago)|
cabal-install is the command-line interface for Cabal.
It provides commands for installing cabal packages, including downloading packages from HackageDB and determining the dependencies among packages. It also provides commands for developers to configure, build, test and upload packages to HackageDB.
(Its predecessor, cabal-get, is now defunct.)
Go to the front page for instructions on reporting bugs in Cabal, cabal-install or the hackage site.
Head branch darcs repositories:
The current development version is quite usable but if you find any surprises please report them in this trac.
Stable branch darcs repositories:
Usage: cabal [GLOBAL FLAGS] or: cabal COMMAND [FLAGS] Global flags: -h --help Show this help text -V --version Print version information --numeric-version Print just the version number Commands: install Installs a list of packages. list List available packages on the server (cached). update Updates list of known packages fetch Downloads packages for later installation or study. upload Uploads source packages to Hackage configure Prepare to build the package. build Make this package ready for installation. copy Copy the files into the install locations. haddock Generate Haddock HTML documentation. clean Clean up after a build. sdist Generate a source distribution file (.tar.gz). hscolour Generate HsColour colourised code, in HTML format. register Register this package with the compiler. test Run the test suite, if any (configure with UserHooks). Typical step for installing Cabal packages: cabal install [PACKAGES] Occasionally you need to update the list of available packages: cabal update For more information about a command, try 'cabal COMMAND --help'. This program is the command line interface to the Haskell Cabal Infrastructure. See http://www.haskell.org/cabal/ for more information.
There is bash command line completion support available, though currently that requires installing manually.
Quick Installation on Unix
wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.0/cabal-install-0.6.0.tar.gz tar -zxf cabal-install-0.6.0.tar.gz cd cabal-install-0.6.0 ./bootstrap.sh
You will now have the cabal binary in $HOME/.cabal/bin. You should also add this directory to your $PATH.
In cabal-install 0.6.0 you can symlink binaries into another directory, eg $HOME/bin which can be done instead of changing the $PATH. To use this feature edit ~/.cabal/config and see the symlink-bindir field.
Note: cabal-install 0.6.0 uses a new default ~/.cabal/config file which is somewhat self-documenting in that it lists all the valid (non-deprecated) fields along with their default values. If you previously used cabal-install 0.5.1 or earlier then you will not see the new format, so you may like to back up your existing config, let cabal-install 0.6.0 re-create the default config and then merge back any local changes. On Windows the configuration file is named $HOME/Application Data/cabal/config.