Emacs 27 overlay, with mac-port patches and some others

Hey people :wave:

I’ve been trying to figure out how I can sort out a recent patched up version of Emacs on my Darwin systems.

The aim is:

  • Emacs 27 (or any HEAD revisions) with jansson support
  • mac-port patches applied
  • Arbitrary patches, like no-title-bars

I recently started using the emacsMacport package, as it has better compatibility with my window manager, along with trying to use the no-title-bars patch above by way of overrideAttrs. It would build fine, but the no-title-bars patch didn’t seem to have any affect (even though it looked like it had been applied).

So, I’ve began my endeavours to try and create an overlay.
Initially, I’m just trying to get Emacs 27 to build with the mac-port patches.
Here’s what I’ve got so far (not working due to configure:6103: error: possibly undefined macro: gl_COMPILER_CLANG):

Does it seem like I’m headed in the right direction?
Has anyone else managed to build Emacs 27 with the mac-port patches applied?

Any help on achieving this is greatly appreciated :pray:

I’m sorry I don’t have the expertise to help, but thanks for working on this! One of the only reasons I still have home brew on my Mac is railwaycat’s emacs-mac port

Hi :upside_down_face: All good, I’ll keep chipping away at this in hopes to either crack it myself or someone in the know can come along and shed some light on it.

To be clear, the mac-port of the current Emacs 26 release is available in nixpkgs :slightly_smiling_face: it’s the ‘emacsMacport’ package.

I’m just hoping to get a recent build running so I can get JSON support for lsp-mode

Well, I got almost what I wanted! Turns out I was presuming too much about the emacs-mac port: it is certainly an Emacs 26 collection of patches. I was operating under the assumption that the work branch included patches for Emacs HEAD.

So, I settled on dropping the emacsMacport attempt and just chucked together an Emacs 27 overlay with a few community patches.

If anyone else is interested, here’s the commit where I added it to my config. This could easily be achieved with overrideAttrs, but there are some more things I may want to do with the overlay.

Here’s what it looks like on macOS with the yabai window manager (check out my repo linked above for a Nix package & service for that!):

1 Like

FYI the nix-community emacs overlay also has Emacs 27 (auto-updating) under the emacsUnstable attribute: GitHub - nix-community/emacs-overlay: Bleeding edge emacs overlay [maintainer=@adisbladis].

3 Likes