haskell/cabal — pull request #988 by 23Skidoo (2012-08-05 07:55:51+00:00)
Title: Extend the source package index format with references to local build trees.

This series of patches implements the first of the two infrastructure changes required to add sandboxes (aka package environments, hermetic builds) to Cabal. It extends the source package index format with a new entry type - a reference to a local build tree, as suggested in [1] and [2]. The bulk of the implementation is contained in the new module `Distribution.Client.Index`.

It also adds a **hidden** command `index` that can be useful for testing. Example of usage:

```
$ mkdir test
$ cabal index --init test
$ ls test
00-index.tar
$ cabal index --link-source Cabal test
$ cabal index --link-source cabal-install test
$ cabal index --list test
/path/to/Cabal
/path/to/cabal-install
$ cabal index --remove-source cabal-install test
$ cabal index --list test
/path/to/Cabal
```

References to local tarballs and remote source repositories are not implemented; neither is inclusion of tarballs by value.

[1] http://www.haskell.org/pipermail/cabal-devel/2011-May/007557.html
[2] http://hackage.haskell.org/trac/hackage/wiki/PackageEnvironments