2024-08-12 23:29:44 -04:00
|
|
|
{pkgs, ...}:
|
2024-08-15 01:18:37 -04:00
|
|
|
with pkgs; let
|
|
|
|
sources = import ../_sources/generated.nix {inherit (pkgs) fetchurl fetchFromGitHub fetchgit dockerTools;};
|
|
|
|
in
|
2024-08-12 23:29:44 -04:00
|
|
|
emacsWithPackagesFromUsePackage {
|
2024-08-13 13:58:32 -04:00
|
|
|
config = ./init.org;
|
|
|
|
defaultInitFile = true;
|
|
|
|
|
2024-08-13 00:56:54 -04:00
|
|
|
package =
|
|
|
|
if pkgs.stdenv.isDarwin
|
2024-08-15 01:28:20 -04:00
|
|
|
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")
|
|
|
|
];
|
|
|
|
})
|
2024-08-13 00:56:54 -04:00
|
|
|
else pkgs.emacs29-pgtk;
|
2024-08-12 23:29:44 -04:00
|
|
|
|
|
|
|
alwaysEnsure = true;
|
|
|
|
alwaysTangle = true;
|
|
|
|
|
2024-08-13 00:54:31 -04:00
|
|
|
extraEmacsPackages = epkgs:
|
2024-08-13 13:58:32 -04:00
|
|
|
with epkgs;
|
|
|
|
[
|
|
|
|
treemacs
|
|
|
|
treemacs-evil
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
ns-auto-titlebar
|
|
|
|
];
|
2024-08-13 00:54:31 -04:00
|
|
|
|
2024-08-12 23:29:44 -04:00
|
|
|
override = epkgs:
|
|
|
|
epkgs
|
|
|
|
// {
|
|
|
|
sideline-eglot = callPackage ./extraPackages/sideline-eglot.nix {
|
2024-08-15 00:18:15 -04:00
|
|
|
inherit sources;
|
2024-08-12 23:29:44 -04:00
|
|
|
inherit (epkgs) trivialBuild sideline;
|
|
|
|
};
|
2024-08-15 00:18:15 -04:00
|
|
|
intuitive-tab-line = callPackage ./extraPackages/intuitive-tab-line.nix {
|
|
|
|
inherit sources;
|
|
|
|
inherit (epkgs) trivialBuild;
|
|
|
|
};
|
2024-08-12 23:29:44 -04:00
|
|
|
};
|
|
|
|
}
|