download all of Hackage?

Alan & Kim Zimmerman alan.zimm at gmail.com
Mon Sep 14 15:19:53 UTC 2015


You could clone https://github.com/bitemyapp/hackage-packages

Alan

On Mon, Sep 14, 2015 at 5:17 PM, Herbert Valerio Riedel <hvriedel at gmail.com>
wrote:

> On 2015-09-14 at 16:43:44 +0200, Richard Eisenberg wrote:
> > Is there an easy way to download (but not compile) all of Hackage? I
> > know of the hackager package, but that's about compiling. I just want
> > a whole big load of Haskell code to play with. I thought I could find
> > a link on Hackage to do this, but failed.
>
> It's quite easy, you can iterate through the list of package names and
> call 'cabal get' like e.g. (untested, but I've done this already -- you
> may need to protect against execution errors)
>
>   for PKG in $(cabal list --simple | awk '{ print $1 }' | uniq); do cabal
> get $PKG;done
>
> another variant is to construct the URLs based on the output;
>
> you can also get a list of packages in JSON format via
>
>  http://hackage.haskell.org/packages/.json
>
> there's many ways to accomplish what you want...
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150914/65a816de/attachment-0001.html>


More information about the ghc-devs mailing list