Skip to content

download all hackage packages (including metadata/cabal revisions) ready to be served with http server

License

Notifications You must be signed in to change notification settings

AleXoundOS/mirror-hackage

Repository files navigation

hackage mirroring program

Download hackage contents for the purpose of mirroring with http server. This should be useful for isolated LAN environments or lasting periods of being offline.

input:

  • path to hackage.json
  • path as a base for downloaded files
  • path to excluded packages list file

All inputs have default values, refer to mirror-hackage --help.

output:

  • files and directories, preserving original url structure, containing:
    • packages archives
    • all revisions (metadata) of cabal package descriptions
    • TODO: html pages

build

nix

nix-build -A mirror-hackage.components.exes.mirror-hackage

The built binary gets available in ./result/bin/mirror-hackage.

stack

$ stack build

The built executable gets available as stack exec -- mirror-hackage.

usage

Get recent hackage.json. Run mirror-hackage provided with hackage.json in the current directory or passed via --hackage-json command line option.

Download can be stopped (Ctrl+C) at any moment and resumed later.

stats

As of 2020-07-06 running mirror-hackage means downloading of 251k files, 13 GiB.

About

download all hackage packages (including metadata/cabal revisions) ready to be served with http server

Topics

Resources

License

Stars

Watchers

Forks