summaryrefslogtreecommitdiff
path: root/doc/install/cabal.mdwn
blob: 3270dd0f9b3fcf11bb0f71deeeb80f71b703e3f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
As a haskell package, git-annex can be installed using cabal. 

This involves building a lot of haskell packages from source, and so it has
a lot of moving parts, and it's not uncommon for it to be broken from time
to time.

If you are not comfortable tracking down and dealing with library build
problems, installing git-annex with cabal is probably not the right choice
for you!

## prerequisites

Start by installing the [Haskell Platform][]. In Debian, this is as
simple as:

    sudo apt-get install haskell-platform

 [Haskell Platform]: http://hackage.haskell.org/platform/

## minimal build

This builds git-annex without some features that require C libraries, that
can be harder to get installed. This is plenty to get started using it,
although it does not include the assistant or webapp.

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install git-annex --bindir=$HOME/bin -f"-assistant -webapp -webdav -pairing -xmpp -dns"

## full build

To build with all features enabled, including the assistant and webapp,
you will need to install several C libraries and their headers,
including libgnutls, libgsasl, libxml2, and zlib. Then run:

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install c2hs --bindir=$HOME/bin
	cabal install git-annex --bindir=$HOME/bin

## building from git checkout

But maybe you want something newer (or older). Then [[download]] the version
you want, and use cabal as follows inside its source tree:

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install c2hs --bindir=$HOME/bin
	cabal install --only-dependencies
	cabal configure
	cabal build
	cabal install --bindir=$HOME/bin

## EKG

When building with cabal, you can optionally enable the 
[[EKG monitoring interface|ekg]]. This is great for debugging resource
usage problems.