This is a Heroku buildpack which installs GNU Emacs for use on server applications such as GNU ELPA Mirror.
To install Emacs for your Heroku app called <myapp>
, run:
$ heroku buildpacks:add \
https://github.com/radian-software/heroku-buildpack-emacs \
-a <myapp>
After the next time you deploy your app, emacs
will be available on
the PATH
.
Supported versions of Emacs are:
25.2
(forheroku-20
and below)25.3
(forheroku-20
and below)26.1
(forheroku-20
and below)26.2
(forheroku-20
and below)26.3
(forheroku-20
and below)27.1
(forheroku-20
and below)27.2
(forheroku-20
and below)28.1
By default the latest supported version will be selected. You can
force a specific version to be selected by setting EMACS_VERSION
appropriately in the app config (e.g. heroku config:set EMACS_VERSION 27.2
).
Supported versions of the Heroku runtime are:
heroku-18
heroku-20
heroku-22
This is detected automatically during buildpack processing and cannot be overridden.
We have a script build.bash
in this repository which does the
following things:
- Pull the latest version of the Heroku runtime base Docker image.
- Run using
--security-opt seccomp=unconfined
to 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
/app/emacs
. - 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.
Because this:
sysdep.c:1821:22: error: variably modified 'sigsegv_stack' at file scope
1821 | static unsigned char sigsegv_stack[SIGSTKSZ];
| ^~~~~~~~~~~~~
If you know how to resolve the compilation error, let me know and I'd be happy to compile prior versions of Emacs for heroku-22.
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.