Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can one make a private copy of Hackage

I'd like to snapshot the global Hackage database into a frozen, smaller one for my company's deploys. How can one most easily copy out some segment of Hackage onto a private server?

like image 461
J. Abrahamson Avatar asked Feb 07 '13 18:02

J. Abrahamson


2 Answers

Here's one script that does it in just about the simplest way possible: https://github.com/jamwt/mirror-hackage

You can also use the MirrorClient directly from the hackage2 repo: http://code.haskell.org/hackage-server/

like image 72
sclv Avatar answered Sep 29 '22 09:09

sclv


This is not an answer two the question in the title but an answer to my interpretation of what the OP wish to achieve.

Depending of what you want for level of stability in your production circle you can approach the problem in several ways.

I have split the dependencies in two parts, things that I can use that are in the haskell platform (keep every platform used in production) and then only use a small number of packages outside that and don't let anyone (including yourself) add more packages into your dependency tree just because of laziness (as developer). These extra packages you use some kind of script for and collect from hackage (lock to version) by using cabal fetch. Keep them safe. Create a install script that uses your safe packages and if a new machine (developer) are added to your team, use that script.

yackage is great but it all comes down to how you ship your product. If you have older versions in production you need to have a yackage setup for every version and that could be quiet annoying after a couple of years.

like image 42
Jonke Avatar answered Sep 29 '22 07:09

Jonke