Next: Theory of patches Up: Darcs User Manual Previous: Darcs commands Contents
Subsections

- The Easy Way
- The Hard Way

# Building darcs

# The Easy Way

If your distribution provides a pre-built binary package of a recent Darcs release, you are strongly encouraged to use that rather than building Darcs yourself.

If you have (or can install) the `cabal-install` package, this is the next best option, as this will resolve build dependencies automatically. To download, compile and install Darcs and its dependencies via cabal-install, simply run

    cabal update
    cabal install darcs

# The Hard Way

If you cannot install `cabal-install`, you need to run

    ghc --make Setup
    ./Setup configure
    ./Setup build
    ./Setup install

This will require the following build dependencies:

- GHC 6.8 or higher; and
- Cabal 1.6 or higher.

Additional build dependencies are declared in the `darcs.cabal` file, and `./Setup configure` will tell you if any required build dependencies aren't found. The build dependencies at time of writing (Darcs 2.3) are as follows:

- the C library zlib;
- the Haskell packages
  - array 1.1 or 1.2;
  - containers 1.1 or 1.2;
  - directory 1.0;
  - filepath 1.1;
  - hashed-storage 0.3;
  - haskeline 0.6.1 or higher;
  - html 1.0;
  - mtl 1.0 or 1.1;
  - old-time 1.0;
  - parsec 2.1 or higher;
  - process 1.0;
  - random 1.0; and
  - regex-compat 0.71 or higher.

Missing optional build dependencies are only listed if `./Setup configure` is passed the `-verbose` argument. At time of writing they are:

- the C library libcurl (7.19.1 or higher recommended);
- the Haskell packages
  - bytestring 0.9;
  - bytestring-mmap 0.2 or higher;
  - http 3000 or 3001.1;
  - network 2.2;
  - terminfo 0.3.
  - utf8-string 0.3; and
  - zlib 0.5.

Next: Theory of patches Up: Darcs User Manual Previous: Darcs commands Contents