about summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-06T11·23+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-06T18·45+0000
commit28af585f3dd6ed30511554e0f0ce0542610144de (patch)
tree4e94690a0a45d1ccf43a660bc8017d4a5600693b /emacs
parent96ff26e5ca815aa738dd7e871e82ce1156982c3a (diff)
Include NIX_PATH settings in nix/rebuild-emacs function
I'm currently setting NIX_PATH in ~/briefcase/shell.nix. This means when I call
`nix/rebuild-emacs` from a buffer that is inside the briefcase directory, the
command succeeds because NIX_PATH is properly defined. When I call
`nix/rebuild-emacs` from any other location it fails.

I'm hard-coding the NIX_PATH in this command so that I can call
`nix/rebuild-emacs` from any buffer that is currently active.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/wpc/wpc-nix.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/.emacs.d/wpc/wpc-nix.el b/emacs/.emacs.d/wpc/wpc-nix.el
index 678bef33b4e2..1060645bb56c 100644
--- a/emacs/.emacs.d/wpc/wpc-nix.el
+++ b/emacs/.emacs.d/wpc/wpc-nix.el
@@ -17,7 +17,6 @@
 ;; Library
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;;; Code:
 (use-package nix-mode
   :mode "\\.nix\\'")
 
@@ -26,7 +25,11 @@
   "Use nix-env to rebuild wpcarros-emacs."
   (interactive)
   (start-process "nix-build/<briefcase/emacs>" "*nix-build/<briefcase/emacs>*"
-                 "nix-env" "-f" "<briefcase>" "-iA" "emacs")
+                 "nix-env"
+                 "-I" (format "nixpkgs=%s" (f-expand "~/nixpkgs"))
+                 "-I" (format "depot=%s" (f-expand "~/depot"))
+                 "-I" (format "briefcase=%s" (f-expand "~/briefcase"))
+                 "-f" "<briefcase>" "-iA" "emacs")
   (display-buffer "*nix-build/<briefcase/emacs>*"))
 
 (defun nix/home-manager-switch ()