This commit is contained in:
Mars 2024-08-15 01:28:20 -04:00
parent bb870d667e
commit 19374f6c07
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
4 changed files with 100 additions and 27 deletions

View file

@ -8,30 +8,22 @@ in
package =
if pkgs.stdenv.isDarwin
then
emacs29-pgtk.overrideAttrs (old: {
patches =
(old.patches or [])
++ [
# Fix OS window role (needed for window managers like yabai)
(sources.fix-window-role.src)
# Use poll instead of select to get file descriptors
(fetchpatch {
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/poll.patch";
sha256 = "0j26n6yma4n5wh4klikza6bjnzrmz6zihgcsdx36pn3vbfnaqbh5";
})
# Enable rounded window with no decoration
(fetchpatch {
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/round-undecorated-frame.patch";
sha256 = "0x187xvjakm2730d1wcqbz2sny07238mabh5d97fah4qal7zhlbl";
})
# Make Emacs aware of OS-level light/dark mode
(fetchpatch {
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/system-appearance.patch";
sha256 = "14ndp2fqqc95s70fwhpxq58y8qqj4gzvvffp77snm2xk76c1bvnn";
})
];
})
then emacs29-pgtk.overrideAttrs (old: let
getPatch = name: sources.${name}.src;
in {
patches =
(old.patches or [])
++ [
# Fix OS window role (needed for window managers like yabai)
(getPatch "fix-window-role")
# Use poll instead of select to get file descriptors
(getPatch "poll")
# Enable rounded window with no decoration
(getPatch "round-undecorated-frame")
# Make Emacs aware of OS-level light/dark mode
(getPatch "system-appearance")
];
})
else pkgs.emacs29-pgtk;
alwaysEnsure = true;