| Version 29 (modified by nr, 4 years ago) |
|---|
Cabal Install
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.)
Download
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/cabal-install
Bugs
Go to the front page for instructions on reporting bugs in Cabal, cabal-install or the hackage site.
Development version
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:
- http://darcs.haskell.org/cabal-branches/cabal-1.6/
- At the moment the head branch of cabal-install is also the stable branch
Usage
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.
See the cabal page for more complete usage 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.2/cabal-install-0.6.2.tar.gz tar -zxf cabal-install-0.6.2.tar.gz cd cabal-install-0.6.2 ./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 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. This omission causes major lossage---the cabal binary cannot find any packages. Reported as part of ticket number 541.
Ubuntu Intrepid Ipex 8.10
These packages must be installed to run successfully bootstrap.sh:
- ghc6
- libghc6-parsec-dev
- libghc6-network-dev
- libghc6-http-dev
- libghc6-mtl-dev
- zlib1g-dev
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
