branch: elpa/nix-mode
commit 54f28871a3306aab403ec98f4ff8765226604cb0
Author: Yilin Wei <[email protected]>
Commit: Yilin Wei <[email protected]>

    Fix issue #70
---
 nix-shell.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/nix-shell.el b/nix-shell.el
index d1754e7c4f..3c3df93bc2 100644
--- a/nix-shell.el
+++ b/nix-shell.el
@@ -32,7 +32,8 @@
   "All nix-shell options."
   :group 'nix)
 
-(defcustom nix-shell-inputs '(depsBuildBuild
+(defcustom nix-shell-inputs '(buildInputs
+                             depsBuildBuild
                              depsBuildBuildPropagated
                              nativeBuildInputs
                              propagatedNativeBuildInputs
@@ -205,12 +206,14 @@ PKGS-FILE a file to use to get the packages."
 
     (setq-local nix-shell-clear-environment t)
 
+    ;; We must start this before the callback otherwise the path is cleared
+    (eshell-mode)
+
     (nix-shell--callback
      (current-buffer)
      (nix-instantiate
       (nix-shell--with-packages-file packages pkgs-file) nil t))
 
-    (eshell-mode)
     buffer))
 
 (defun nix-eshell (file &optional attr)
@@ -225,11 +228,13 @@ ATTR attribute to instantiate in NIX-FILE."
 
     (setq-local nix-shell-clear-environment t)
 
+    ;; We must start this before the callback otherwise the path is cleared
+    (eshell-mode)
+
     (nix-shell--callback
      (current-buffer)
      (nix-instantiate file attr t))
 
-    (eshell-mode)
     buffer))
 
 ;;;###autoload

Reply via email to