branch: elpa/nix-mode
commit 3a6634378a5a808a74807aa2c013341f141798c8
Author: Matthew Bauer <[email protected]>
Commit: Matthew Bauer <[email protected]>

    Allow nix-repl be in custom location
    
    ‘nix-repl-executable’ sets where the nix-repl command is located.
---
 nix-repl.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/nix-repl.el b/nix-repl.el
index 1096676186..ff5f9899de 100644
--- a/nix-repl.el
+++ b/nix-repl.el
@@ -9,6 +9,13 @@
 
 (defvar nix-prompt-regexp "nix-repl> ")
 
+(defgroup nix-repl nil
+  "nix-repl customizations"
+  :group 'nix)
+
+(defcustom nix-repl-executable "nix-repl"
+  "Location of nix-repl command.")
+
 (define-derived-mode nix-repl-mode comint-mode "Nix-REPL"
   "Interactive prompt for Nix."
   (setq-local comint-prompt-regexp nix-prompt-regexp)
@@ -24,7 +31,7 @@
     (nix-repl-mode)))
 
 (defun nix--make-repl-in-buffer (buffer)
-  (make-comint-in-buffer "Nix-REPL" buffer "nix-repl"))
+  (make-comint-in-buffer "Nix-REPL" buffer nix-repl-executable))
 
 (defun nix-get-completions (proc prefix)
   (save-match-data

Reply via email to