branch: elpa/nix-mode
commit ecee0e39e972aa4aabfa2b44046933b2ed87bbbf
Author: Matthew Bauer <[email protected]>
Commit: Matthew Bauer <[email protected]>
Add second options for nix-shell
---
nix-shell.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/nix-shell.el b/nix-shell.el
index a7892a5148..7e7863a4bf 100644
--- a/nix-shell.el
+++ b/nix-shell.el
@@ -17,13 +17,16 @@
:group 'nix)
;;;###autoload
-(defun nix-shell (attribute)
+(defun nix-shell (path attribute)
"Run nix-shell in a terminal.
+PATH path containing Nix expressions.
ATTRIBUTE attribute name in nixpkgs to use."
- (interactive (list (read-from-minibuffer "Attribute name: ")))
+ (interactive
+ (list (read-from-minibuffer "Nix path: " "<nixpkgs>")
+ (read-from-minibuffer "Nix attribute name: ")))
(set-buffer (make-term "nix-shell" nix-shell-executable nil
- "<nixpkgs>" "-A" attribute))
+ path "-A" attribute))
(term-mode)
(term-char-mode)
(switch-to-buffer "*nix-shell*"))