Diff: [root] @ 7b476afb62d | faq | css

howto/setup-hackage-mirror

File: howto/index [Diff]

diff --git a/howto/index b/howto/index
index ffdb9cb..5d5dbad 100644
-- a/howto/index
++ b/howto/index
@@ -4,3 +4,4 @@ boot-iso-from-flash - How to boot .iso image from flash drive
read-song-lyrics - How to read song lyrics online the most comfortable way
vangers-linux - How to play beta version of Vangers on linux
celebrate - How to celebrate properly (Russian)
setup-hackage-mirror - How to set up Hackage mirror
\ No newline at end of file

File created: 33188 howto/setup-hackage-mirror [Diff]

diff --git a/howto/setup-hackage-mirror b/howto/setup-hackage-mirror
new file mode 100644
index 0000000..220489b
-- /dev/null
++ b/howto/setup-hackage-mirror
@@ -0,0 +1,19 @@
h1. How to set up a "hackage":http://hackage.haskell.org/packages/hackage.html mirror

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

2. Download a tarball with latest hackage contents from [http://hackage.haskell.org/cgi-bin/hackage-scripts/archive.tar]

bc. wget http://hackage.haskell.org/cgi-bin/hackage-scripts/archive.tar -O /tmp

3. This archive contains packages in tar.gz's placed in folders (@HAppS-Server/0.9.3.1/HAppS-Server-0.9.3.1.tar.gz@), which should be placed in @package@ subdirectory on server. However, if your mirror hostname is not @hackage.haskell.org@ (*UGLY UGLY HACK GODDAMN WHOEVER DONE IT*), cabal will request not @package/HAppS-Server/0.9.3.1/HAppS-Server-0.9.3.1.tar.gz@, but just @package/HAppS-Server-0.9.3.1.tar.gz@. So, we need to transform file paths:

bc. tar xf /tmp/archive.tar --transform 's|^.*/|package/|'

4. Download package index:

bc. wget http://hackage.haskell.org/packages/archive/00-index.tar.gz

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

Here's a shell script that does it for you: [http://gist.github.com/562813]
\ No newline at end of file

By Voker57 on 2010-09-02 23:35:33 +0400 Powered by bitcheese wiki engine