# This file defines overlays {inputs, ...}: { # Emacs overlay for latest Emacs builds emacs = inputs.emacs-overlay.overlays.default; # This one brings our custom packages from the 'pkgs' directory additions = final: _prev: import ../pkgs final.pkgs; # This one contains whatever you want to overlay # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays modifications = final: prev: { # Add emacs-plus patches on top of emacs-overlay's emacs30 emacs30 = prev.emacs30.overrideAttrs (old: { patches = (old.patches or []) ++ [ # Fix window role for yabai compatibility (final.fetchpatch { name = "fix-window-role.patch"; url = "http://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/refs/heads/master/patches/emacs-28/fix-window-role.patch"; hash = "sha256-+z/KfsBm1lvZTZNiMbxzXQGRTjkCFO4QPlEK35upjsE="; }) ]; }); }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will # be accessible through 'pkgs.unstable' unstable-packages = final: _prev: { unstable = import inputs.nixpkgs-unstable { system = final.system; config.allowUnfree = true; }; }; }