about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/wpc-nix.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-02T13·45+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-02-02T18·31+0000
commitffbe5c9757c4da212ea9e968c2f61265b905a41b (patch)
treec83330d7b6133be4cdd3c14848a0180f8d3f67d2 /emacs/.emacs.d/wpc/wpc-nix.el
parent2cfcb1c34de7923231533331548484b00dea71f8 (diff)
Support emacs fn for rebuilding wpcarros-emacs
Call `M-x` `nix/rebuild-emacs` to build and link `wpcarros-emacs`.
Diffstat (limited to 'emacs/.emacs.d/wpc/wpc-nix.el')
-rw-r--r--emacs/.emacs.d/wpc/wpc-nix.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/.emacs.d/wpc/wpc-nix.el b/emacs/.emacs.d/wpc/wpc-nix.el
index 7407e02bfd41..15806e042fd3 100644
--- a/emacs/.emacs.d/wpc/wpc-nix.el
+++ b/emacs/.emacs.d/wpc/wpc-nix.el
@@ -21,6 +21,13 @@
 (use-package nix-mode
   :mode "\\.nix\\'")
 
+(defun nix/rebuild-emacs ()
+  "Use nix-env to rebuild wpcarros-emacs."
+  (interactive)
+  (start-process "nix-build/<briefcase>.emacs" "*nix-build/<briefcase>.emacs*"
+                 "nix-env" "-f" (f-join (getenv "BRIEFCASE") "emacs") "-i")
+  (display-buffer "*nix-build/<briefcase>.emacs*"))
+
 (defun nix/sly-from-briefcase (attribute)
   "Start a Sly REPL configured with a Lisp matching a derivation
   from my monorepo.