Emacs buildpack for Heroku
To install Emacs for your Heroku app called
$ heroku buildpacks:add \ https://github.com/raxod502/heroku-buildpack-emacs \ -a <myapp>
After the next time you deploy your app,
emacs will be available on
Supported versions of Emacs are:
By default the latest supported version will be selected. You can
force a specific version to be selected by setting
appropriately in the app config (e.g.
heroku config:set EMACS_VERSION 27.2).
Supported versions of the Heroku runtime are:
This is detected automatically during buildpack processing and cannot be overridden.
How does it work?
We have a script
build.bash in this repository which does the
- Pull the latest version of the Heroku runtime base Docker image.
- Run using
--security-opt seccomp=unconfinedto support pre-27.1 versions of Emacs that use some very sketchy OS features as part of the build process.
- Run using
- Download the Emacs source code into it.
- Compile and install it with a prefix of
- Create a tarball of that installation and export it outside the container.
Then I manually do the following:
- Create an empty tag in this repo named
heroku-VER-emacs-VER(where the versions are for the Heroku stack and Emacs respectively).
- Upload the tarball to that tag as a GitHub Release. Provided I follow the existing naming convention, this is picked up automatically by the buildpack.
- Install using heroku-buildpack-apt: Because it doesn't work, which is because Emacs installations are not relocatable.
- Build from source at deployment time: Because we can't use Docker when executing a buildpack.
This repository was originally forked from kosh04/heroku-buildpack-emacs, but today literally none of the original code or documentation remains, so I marked it as a source repository and added a license.