From 28af585f3dd6ed30511554e0f0ce0542610144de Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 6 Mar 2020 11:23:52 +0000 Subject: 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. --- emacs/.emacs.d/wpc/wpc-nix.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'emacs/.emacs.d/wpc/wpc-nix.el') 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/" "*nix-build/*" - "nix-env" "-f" "" "-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" "" "-iA" "emacs") (display-buffer "*nix-build/*")) (defun nix/home-manager-switch () -- cgit 1.4.1