Download Darcs

The current stable release is darcs 2.4, released in February 2010 (announcement). Here are directions for building darcs from source, followed by links to the best available binaries for each platform.

Compiling from source

Darcs is written in Haskell, and to build it you will need the Glasgow Haskell Compiler (GHC). If you don't already have GHC, you'll need to install one of the GHC binary packages (see also GHC User's Guide: Obtaining GHC). Building GHC from source is also possible but less easy.

Next, if you already have some version of darcs 2, you can get the latest unstable branch using darcs itself:

darcs get --lazy http://darcs.net/

Otherwise, download the tarball from http://darcs.net . If for whatever reason you need an older release of darcs, see Releases

For more details, see Building Darcs in the official manual. See also: CompilingOnCygwin

Microsoft Windows

For local or HTTP access, just download the zip file above and unpack it. If you need SSH support, see WindowsConfiguration.

Mac OS X

MacOS X now has four binary architectures; ppc, ppc64, x86, x86_64. For the purposes of haskell/darcs building, I think this mostly amounts the two architectures of the ppc/x86 split. The Rosetta emulation layer that ships with 10.4 x86 allows x86 users to run many (but not all) ppc binaries, however ppc users cannot run x86 binaries.

Intel OS X

MacPorts and Fink

Both MacPorts and Fink have package based installers of darcs.

GNU/Linux

Binary for Linux

v2.2.0 above is useful if you have a "Kernel too old" error with v2.3.1 .

Arch Linux

Darcs is in the extra package repository that is enabled by default. Just run:

pacman -Sy darcs

Debian

Darcs is available in all current Debian releases in the darcs package. For example, to install using apt-get:

apt-get install darcs

Fedora

For recent versions of Fedora, Darcs is just included. Do the usual to install:

yum install darcs

Frugalware Linux

To install binary package:

pacman-g2 -Sy darcs

To build it from source:

repoman upd && repoman merge darcs

Gentoo Linux

emerge darcs

If the version this gives you is not recent enough you can try the "unstable" version (for non-i386 platforms replace ~x86 with correct keyword, for amd-64 use ~amd64):

mkdir /etc/portage *(if you have not already done so)*
echo "dev-util/darcs ~x86" >> /etc/portage/package.keywords
emerge darcs

You can see which "stable" and "unstable" versions are available for your architecture at http://packages.gentoo.org/package/dev-util/darcs

Mandriva Linux

Darcs is officially included in all current Mandriva distributions. Ensure your urpmi is setup with contrib media, then type (as root):

urpmi darcs

For all issue related to this package, please contact the official maintainer: nanardon@mandriva.org

To have benefits of bash completion, simply install bash-completion package:

urpmi bash-completion

Ubuntu Linux

Darcs is in the universe section of Ubuntu, thus universe should be in your apt sources. Take a look at http://www.ubuntu.com/community/ubuntustory/components for adding universe (summary: edit /etc/apt/sources.list). Now simply add it through Synaptics Package Manager or:

apt-get install darcs

The following page hosts Darcs 2.4.0b1 binaries built for Ubuntu 6.06 LTS (Dapper), using an out-of-band GHC 6.12.1. The static-nocurl will be slower, so avoid it if possible. The dynamically linked library requires: libcurl3-gnutls and libgmp3c2.

http://code.haskell.org/~twb/darcs-binaries/

BSD

FreeBSD

To see wether Darcs builds on your FreeBSD version, check the FreeBSD ports collection:

To build from source: cd /usr/ports/devel/darcs && make install or, to install the server as well: cd /usr/ports/devel/darcs && make -DWITH_SERVER install If you install the server, the CGI executable is installed as /usr/local/libexec/darcs/cgi-bin/darcs, and its configuration file is /usr/local/etc/darcs/darcs/cgi.conf.

Since darcs depends on Haskell, be prepared for the above to also download and install any Haskell related ports that you don't already have, such as ghc.

To fetch and install a binary package from an official FreeBSD server: pkg_add -r darcs

The statically-linked Linux binary above also appears to work if you've got COMPAT_LINUX in your kernel.

If you want to compile darcs yourself on FreeBSD, be sure to use gmake instead of make.

JanLudewig: ''On FreeBSD 8x and probably 7x, it won't compile without this patch: http://www.nabble.com/ports-117535-3A--PATCH--devel-darcs-3A-port-is-broken-for-RELENG_7-to13428315.html

NetBSD

No native binaries are available yet. On x86, the statically-linked Linux binary above works if you've got COMPAT_LINUX in your kernel.

It's possible to use pkgsrc to install binary or build Darcs from sources. Darcs is in directory pkgsrc/devel/darcs.

Solaris

  • Binaries:
-- darcs-v2.0.0 + 283 patches for Solaris 11 (SunOS 5.11) on x86

architecture: http://www.mico.org/~karel/darcs-2.0.0-p283-x86-SunOS.tar.bz2

You'll need SUNWcurl installed to make this work.

-- Be wary that gcc-3.0 through gcc-3.3 generate bad code when used

with GHC under sparc. (So use 2.95 or 3.4+)

-- When building on a sun-sparc-solaris2.6 machine, I had to add

-lposix4 -lpthread to the LDFLAGS before calling the configure script, or the produced binary would fail when using pthreads (for example when recording a compressed patch).