about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tools/emacs/default.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix
index 9d472f03c194..8d12bcb11dbf 100644
--- a/tools/emacs/default.nix
+++ b/tools/emacs/default.nix
@@ -11,7 +11,8 @@ let
   localPackages = pkgs.tools.emacs-pkgs;
   emacsWithPackages = (third_party.emacsPackagesNgGen third_party.emacs26).emacsWithPackages;
 
-  tazjinsEmacs = (emacsWithPackages(epkgs:
+  identity = x: x;
+  tazjinsEmacs = pkgfun: (emacsWithPackages(epkgs: pkgfun(
   # Actual ELPA packages (the enlightened!)
   (with epkgs.elpaPackages; [
     ace-window
@@ -82,13 +83,13 @@ let
 
   # Custom packages
   [ carp-mode localPackages.dottime localPackages.term-switcher ]
-  ));
-in third_party.writeShellScriptBin "tazjins-emacs" ''
-  exec ${tazjinsEmacs}/bin/emacs \
+  )));
+in lib.fix(self: f: third_party.writeShellScriptBin "tazjins-emacs" ''
+  exec ${tazjinsEmacs f}/bin/emacs \
     --debug-init \
     --no-site-file \
     --no-site-lisp \
     --no-init-file \
     --directory ${./config} \
     --eval "(require 'init)" $@
-''
+  '' // { overrideEmacs = f': self f'; }) identity