|Version 43 (modified by kosmikus, 13 months 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.
Cabal install is included in the haskell platform:
You can also download it directly from its hackage page:
Go to the front page for instructions on reporting bugs in Cabal, cabal-install or the hackage site.
Head branch darcs repositories:
Note: The cabal repo now includes both the Cabal library and the cabal-install tool.
The current development version is quite usable but if you find any surprises please report them in this trac.
Stable branch darcs repository:
This repository contains both the Cabal-1.14 branch and the cabal-install-0.14 branch.
This program is the command line interface to the Haskell Cabal infrastructure. See http://www.haskell.org/cabal/ for more information. Usage: cabal COMMAND [FLAGS] or: cabal [GLOBAL 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. update Updates list of known packages list List packages matching a search string. info Display detailed information about a particular package. fetch Downloads packages for later installation. unpack Unpacks packages for user inspection. check Check the package for common mistakes sdist Generate a source distribution file (.tar.gz). upload Uploads source packages to Hackage report Upload build reports to a remote server. init Interactively create a .cabal file. 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. 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). bench Run the benchmark, if any (configure with UserHooks). upgrade (command disabled, use install instead) help Help about commands For more information about a command use: cabal COMMAND --help To install Cabal packages from hackage use: cabal install foo [--dry-run] Occasionally you need to update the list of available packages: cabal update You can edit the cabal configuration file to set defaults: $HOME/.cabal/config
See the cabal page for more complete usage information.
Quick Installation on Unix
wget http://hackage.haskell.org/packages/archive/cabal-install/0.8.2/cabal-install-0.8.2.tar.gz tar -zxf cabal-install-0.8.2.tar.gz cd cabal-install-0.8.2 sh ./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 and later you can get cabal to automatically 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 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 re-create the default config and then merge back any local changes. On Windows the configuration file is named $HOME/Application Data/cabal/config.
Reply to note: As of 19 April 2009, cabal-install does not actually create ~/.cabal/config. In order to have a config file, you must first run cabal update or similar.
Ubuntu Intrepid Ibex 8.10
These packages must be installed to run successfully bootstrap.sh:
You can execute this command to satisfy these dependencies:
sudo apt-get install ghc6 libghc6-parsec-dev libghc6-network-dev libghc6-http-dev libghc6-mtl-dev zlib1g-dev
Storage and Identification of Cabalized Packages: "This article describes where library packages for GHC are stored, how GHC remembers them, and corollaries. Cabal tries to abstract this away from you, but the abstraction leaks. ... This article is Linux-centric." Highly recommended. *