Personal tools

Cabal/How to install a Cabal package

From HaskellWiki

< Cabal
Revision as of 21:02, 27 January 2007 by RossPaterson (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You've found an interesting Haskell package on HackageDB. How do you install it on your system?

  1. Check whether the package came with your Haskell implementation.
  2. If your system has a packaging system (e.g. most Linux or BSD distributions), check whether it is already packaged there.
  3. Otherwise, you'll have to build and install the package. A program to automate this process, called cabal-install, is under development. In the meantime, you'll have to do it manually:
    1. First, ensure that all the packages it depends on are installed (by following these instructions recursively).
    2. Unpack the tar file (yes, this assumes a Unix system; sorry about that):
      tar xzf PACKAGE-VERSION.tar.gz
    3. Move into the directory this creates:
    4. This directory should contain a file Setup.hs or Setup.lhs. Execute the following commands for the appropriate file (see the Cabal documentation for more details):
      runghc Setup.hs configure
      runghc Setup.hs build
      runghc Setup.hs install