MyNixOS website logo
Description

A framework for packaging Haskell software.

NOTE: This is a temporary fork of Cabal necessary for https://github.com/fpco/ide-backend. It is not intended as a replacement for the standard Cabal package, and should in general not be used at all outside of ide-backend.

The Haskell Common Architecture for Building Applications and Libraries: a framework defining a common interface for authors to more easily build their Haskell applications in a portable way.

The Haskell Cabal is part of a larger infrastructure for distributing, organizing, and cataloging Haskell libraries and tools.

The Cabal library package

See the Cabal web site for more information.

If you also want the cabal command-line program, you need the cabal-install package in addition to this library.

Installing the Cabal library

If you already have the cabal program

In this case run:

$ cabal install

However, if you do not have an existing version of the cabal program, you first must install the Cabal library. To avoid this bootstrapping problem, you can install the Cabal library directly as described below.

Installing as a user (no root or administrator access)

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

Note the use of the --user flag at the configure step.

Compiling 'Setup' rather than using runghc Setup is much faster and works on Windows. For all packages other than Cabal itself, it is fine to use runghc.

This will install into $HOME/.cabal/ on Unix and into Documents and Settings\$User\Application Data\cabal\ on Windows. If you want to install elsewhere, use the --prefix= flag at the configure step.

Installing as root or Administrator

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

Compiling Setup rather than using runghc Setup is much faster and works on Windows. For all packages other than Cabal itself, it is fine to use runghc.

This will install into /usr/local on Unix, and on Windows it will install into $ProgramFiles/Haskell. If you want to install elsewhere, use the --prefix= flag at the configure step.

Using older versions of GHC and Cabal

It is recommended that you leave any pre-existing version of Cabal installed. In particular, it is essential you keep the version that came with GHC itself, since other installed packages require it (for instance, the "ghc" API package).

Prior to GHC 6.4.2, however, GHC did not deal particularly well with having multiple versions of packages installed at once. So if you are using GHC 6.4.1 or older and you have an older version of Cabal installed, you should probably remove it by running:

$ ghc-pkg unregister Cabal

or, if you had Cabal installed only for your user account, run:

$ ghc-pkg unregister Cabal --user

The filepath dependency

Cabal uses the filepath package, so it must be installed first. GHC version 6.6.1 and later come with filepath, however, earlier versions do not by default. If you do not already have filepath, you need to install it. You can use any existing version of Cabal to do that. If you have neither Cabal nor filepath, it is slightly harder but still possible.

Unpack Cabal and filepath into separate directories. For example:

tar -xzf filepath-1.1.0.0.tar.gz
tar -xzf Cabal-1.6.0.0.tar.gz

# rename to make the following instructions simpler:
mv filepath-1.1.0.0/ filepath/
mv Cabal-1.6.0.0/ Cabal/

cd Cabal
ghc -i../filepath -cpp --make Setup.hs -o ../filepath/setup
cd ../filepath/
./setup configure --user
./setup build
./setup install

This installs filepath so that you can install Cabal with the normal method.

More information

Please see the Cabal web site for the user guide and API documentation. There is additional information available on the development wiki.

Bugs

Please report bugs and feature requests to Cabal's bug tracker.

Your help

To help Cabal's development, it is enormously helpful to know from Cabal's users what their most pressing problems are with Cabal and Hackage. You may have a favourite Cabal bug or limitation. Look at Cabal's bug tracker. Ensure that the problem is reported there and adequately described. Comment on the issue to report how much of a problem the bug is for you. Subscribe to the issues's notifications to discussed requirements and keep informed on progress. For feature requests, it is helpful if there is a description of how you would expect to interact with the new feature.

Source code

You can get the master development branch using:

$ git clone https://github.com/haskell/cabal.git

Credits

Cabal developers (in alphabetical order):

  • Krasimir Angelov
  • Bjorn Bringert
  • Duncan Coutts
  • Isaac Jones
  • David Himmelstrup ("Lemmih")
  • Simon Marlow
  • Ross Patterson
  • Thomas Schilling
  • Martin Sjögren
  • Malcolm Wallace
  • and nearly 30 other people have contributed occasional patches

Cabal specification authors:

  • Isaac Jones
  • Simon Marlow
  • Ross Patterson
  • Simon Peyton Jones
  • Malcolm Wallace.
Metadata

Version

1.23.0.0

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows