Page: [root]/howto/setup-hackage-mirror | src | faq | css

How to set up a hackage mirror

1. cd to a clean directory where you want your hackage mirror to be

2. Download package index:


3. This package index contains .cabal files of all packages that are available on hackage in /packages/archive/$package/$version/$package-$version.tar.gz. However, this is an exception for, added and maintained by some moron. If your host is different, you have to serve them as /package/$package-$version.tar.gz. So, here's a shell script that downloads and places them for you:

for splitpk in `tar tf 00-index.tar.gz | cut -d/ -f 2,3`; do
	pk=`echo $splitpk | sed 's|/|-|'`
	if [ ! -a package/$name ]; then
		wget$splitpk/$name -O package/$name

That is all! You can serve this directory as hackage mirror.

Here's a shell script that does it all for you:

I also run a hackage mirror myself, with rsync support (see howto-rsync.txt).

Powered by bitcheese wiki engine