Page: [root]/hellnet/hspawn/hackage | src | faq | css

How to set up distributed Hackage mirror using Hellnet

1. Install Hellnet

2. Generate yourself a meta key

% hell-meta genkey
Your key ID is 1HZYTR77ETSZBRVGCERFK48JHTR90HGPJPHEQJGHWKV280K0Q4J2116XBTR8YSZW49FCTTT4CRBYZGR0534RCQ1EMN5TEQFNCGG6RWN
% hell-meta alias add hackey 1HZYTR77ETSZBRVGCERFK48JHTR90HGPJPHEQJGHWKV280K0Q4J2116XBTR8YSZW49FCTTT4CRBYZGR0534RCQ1EMN5TEQFNCGG6RWN

3. Set up a Hackage mirror in a directory: see this howto for instructions.

4. Share this directory as a meta:

% hell-dir push . hackey hackage
<...>
Updating meta...
Success

5. Use this meta link to serve directory via HTTP or share it with others: hell://meta/1HZYTR77ETSZBRVGCERFK48JHTR90HGPJPHEQJGHWKV280K0Q4J2116XBTR8YSZW49FCTTT4CRBYZGR0534RCQ1EMN5TEQFNCGG6RWN/hackage

% hell-serve-meta 8888 hell://meta/1HZYTR77ETSZBRVGCERFK48JHTR90HGPJPHEQJGHWKV280K0Q4J2116XBTR8YSZW49FCTTT4CRBYZGR0534RCQ1EMN5TEQFNCGG6RWN/hackage

This command will launch a HTTP server on port 8888 that will serve specified meta as file tree. You may want to add -b 127.0.0.1 and -b6 :: to restrict connections to localhost.

Now you can add this location to your Cabal config:

% echo "remote-repo: localhost:http://localhost:8887" >> ~/.cabal/config
% cabal update

That's all! Now you can install packages from hackage mirror.

The reference Hackage mirror is run at [hell://meta/2RMW5V0ZXWGS1NAXEY14WJ4M7MZV736AGTN4PA5CQ14WVED2K5HT8RS2R1V59RYK37B604ZN11TAKG63FNAH36D3C1PFTFQPCF1YCRX/hackage]


Powered by bitcheese wiki engine