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

    Fix nix-system in nix-2.4
---
 nix.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nix.el b/nix.el
index 2ea7d09b9b..35735abaef 100644
--- a/nix.el
+++ b/nix.el
@@ -61,7 +61,9 @@
 (defun nix-system ()
   "Get the current system tuple."
   (with-temp-buffer
-    (call-process nix-executable nil (list t nil) nil "eval" "--raw" 
"(builtins.currentSystem)")
+    (if (nix-is-24)
+       (call-process nix-executable nil (list t nil) nil "eval" "--impure" 
"--raw" "--expr" "(builtins.currentSystem)")
+      (call-process nix-executable nil (list t nil) nil "eval" "--raw" 
"(builtins.currentSystem)"))
     (buffer-string)))
 
 (defvar nix-version nil)

Reply via email to