From 43f07099a7adad1b8401b5a591bb418a0860239b Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 16 Dec 2019 23:55:12 +0000 Subject: feat(emacs): Install 'request.el', an HTTP client --- tools/emacs/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix index 8f036208e902..5ab790c2aea3 100644 --- a/tools/emacs/default.nix +++ b/tools/emacs/default.nix @@ -64,6 +64,7 @@ let rainbow-delimiters refine restclient + request sly string-edit swiper -- cgit 1.4.1 From 05168b9a3c8209d900df632e9fc57f7e744e07a4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 16 Dec 2019 23:55:23 +0000 Subject: feat(emacs): Add 'withLocalEmacs' override function This function makes it possible to build an Emacs instance that, instead of launching an Emacs built by Nix, configures an Emacs already present on the system to use the packages built by Nix. This **requires** that the versions of the two Emacsen (i.e. the one used by Nix to build and the one used to run the packages) are kept in sync, otherwise byte-code incompatibilities may lead to undefined behaviour. --- tools/emacs/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools') diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix index 5ab790c2aea3..54bd0d80eafe 100644 --- a/tools/emacs/default.nix +++ b/tools/emacs/default.nix @@ -101,4 +101,16 @@ in lib.fix(self: l: f: third_party.writeShellScriptBin "tazjins-emacs" '' # Call withLocalConfig with the path to a *folder* containing a # `local.el` which provides local system configuration. withLocalConfig = confDir: self confDir f; + + # Build a derivation that uses the specified local Emacs (i.e. + # built outside of Nix) instead + withLocalEmacs = emacsBin: third_party.writeShellScriptBin "tazjins-emacs" '' + exec ${emacsBin} \ + --debug-init \ + --no-site-file \ + --no-init-file \ + --directory ${(tazjinsEmacs f).deps}/share/emacs/site-lisp \ + --directory ${./config} ${if l != null then "--directory ${l}" else ""} \ + --eval "(require 'init)" $@ + ''; }) null identity -- cgit 1.4.1