[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 04d9a86eae 437/500: Merge pull request #130 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 04d9a86eae 437/500: Merge pull request #130 from nagy/simplify |
Date: |
Sat, 29 Jan 2022 08:27:54 -0500 (EST) |
branch: elpa/nix-mode
commit 04d9a86eaed7d3e56f288e3d77f1087a5c69cd81
Merge: df4ba688a7 a8a513770a
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #130 from nagy/simplify
Simplify some functions
---
nix.el | 34 ++++++++++++----------------------
1 file changed, 12 insertions(+), 22 deletions(-)
diff --git a/nix.el b/nix.el
index ede66d7790..2ea7d09b9b 100644
--- a/nix.el
+++ b/nix.el
@@ -17,6 +17,7 @@
;;; Code:
(require 'pcomplete)
+(require 'json)
(defgroup nix nil
"Nix-related customizations"
@@ -59,35 +60,24 @@
(defun nix-system ()
"Get the current system tuple."
- (let ((stdout (generate-new-buffer "nix eval"))
- result)
- (call-process nix-executable nil (list stdout nil) nil
- "eval" "--raw" "(builtins.currentSystem)")
- (with-current-buffer stdout (setq result (buffer-string)))
- (kill-buffer stdout)
- result))
+ (with-temp-buffer
+ (call-process nix-executable nil (list t nil) nil "eval" "--raw"
"(builtins.currentSystem)")
+ (buffer-string)))
(defvar nix-version nil)
(defun nix-version ()
"Get the version of Nix"
- (if nix-version nix-version
- (let ((stdout (generate-new-buffer "nix eval"))
- result)
- (call-process nix-executable nil (list stdout nil) nil "--version")
- (with-current-buffer stdout (setq result (buffer-string)))
- (kill-buffer stdout)
- result)))
+ (or nix-version
+ (with-temp-buffer
+ (call-process nix-executable nil (list t nil) nil "--version")
+ (buffer-string))))
(defun nix-show-config ()
"Show nix config."
- (let ((stdout (generate-new-buffer "nix config"))
- result)
- (call-process nix-executable nil (list stdout nil) nil "show-config"
"--json")
- (setq result (with-current-buffer stdout
- (goto-char (point-min))
- (json-read)))
- (kill-buffer stdout)
- result))
+ (with-temp-buffer
+ (call-process nix-executable nil (list t nil) nil "show-config" "--json")
+ (goto-char (point-min))
+ (json-read)))
(defvar nix-commands
'("add-to-store"
- [nongnu] elpa/nix-mode e7fa834b80 383/500: Update nix-shell.el, (continued)
- [nongnu] elpa/nix-mode e7fa834b80 383/500: Update nix-shell.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 21d3ba0b80 382/500: Update yaml again, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7487346812 378/500: Add flake, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 015bf9639a 386/500: Remove filenames handling, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0e3a8ef7a8 398/500: Check for process before completing in nix-repl, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 12d1e29ff1 397/500: Merge pull request #106 from jcs-PR/minor, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8bc6750c4c 420/500: Update flake.lock., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1b1b9fb61d 440/500: Update nixos, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f2acc55830 431/500: Add .dir-locals.el file, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1697f18066 439/500: Fix #128, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 04d9a86eae 437/500: Merge pull request #130 from nagy/simplify,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 9362a70d0b 468/500: nix-flake: Organize the library into outlines, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 241cc0881e 466/500: nix-flake.el: Init nix-flake command, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode dd0d1c0d0b 467/500: nix-flake: WIP: nix-flake-init, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode acf4fd09db 470/500: nix-flake: Add customization options, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7346057087 471/500: nix-flake: Show aliases in the registry as well, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode de85646434 486/500: Add dependabot.yml, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 186698599c 480/500: nix-flake: Set a prompt string, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6712a66321 381/500: Fix yaml, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1c42c634bf 379/500: Allow missing git repo, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 38958e5203 413/500: Update install-nix-action in GitHub Action, ELPA Syncer, 2022/01/29