Skip to content
πŸ”‘ Bypasses terrible package management decisions.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.flake8
.gitignore
Pipfile
Pipfile.lock
README.md
cron.sh
gnu_elpa_mirror.py

README.md

GNU ELPA Mirror

This repository hosts a tool for maintaining a GitHub mirror of the GNU ELPA Emacs Lisp Package Archive. The service is deployed to Heroku and runs daily.

Why?

GNU ELPA uses an overly complex, unwieldy, and fragile build process. Therefore, running GNU ELPA packages directly from source is not an easy task. In addition to the added complexity when compared to MELPA, running some packages requires a local checkout of the Emacs source repository.

These problems are all neatly avoided if the GNU ELPA build process is run on Heroku and the results are mirrored to GitHub, so that the packages can be easily run from source by anyone.

Usage

There is a listing of all mirrored packages. This should correlate roughly with the list of published GNU ELPA packages.

The package named <foo> can be found at the URL:

https://github.com/emacs-straight/<foo>

If you use the package manager straight.el, these packages will be automatically used (provided they are not also available from MELPA or Org ELPA) with the following configuration:

(setq straight-recipes-gnu-elpa-use-mirror t)

This is also documented in the straight.el documentation.

Deployment

  • Create a Heroku app named gnu-elpa-mirror.

  • Add the following buildpacks:

    heroku/python
    https://github.com/raxod502/heroku-buildpack-emacs
    
  • Set the ACCESS_TOKEN config var to a GitHub personal access token with the public_repo permission.

  • Add the Heroku Scheduler addon.

  • Configure Scheduler to run the command ./cron.daily.sh every day.

  • Set up automatic deploys when pushing to GitHub.

Debugging

Run it locally (in a virtualenv, after installing from requirements.txt):

$ python3 -m gnu_elpa_mirror

Test the cron job manually:

$ heroku run ./cron.daily.sh

Interactive testing:

$ heroku run bash
You can’t perform that action at this time.