[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 93bfb4428d 182/500: Add nix-build function.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 93bfb4428d 182/500: Add nix-build function. |
Date: |
Sat, 29 Jan 2022 08:27:04 -0500 (EST) |
branch: elpa/nix-mode
commit 93bfb4428de869f8dc3d1339fbaa5971ed83c5ef
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Add nix-build function.
I use this in nixpkgs a lot. Instead of a terminal just open a dired window
and
type:
M-x nix-build
followed by what attribute you want to build.
---
nix-mode.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/nix-mode.el b/nix-mode.el
index 6f32252b93..27308320b3 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -464,6 +464,17 @@ STRING-TYPE type of string based off of Emacs syntax table
types"
(when (require 'mmm-mode nil 'noerror) (require 'nix-mode-mmm nil 'noerror))
+;;;###autoload
+(defun nix-build (&optional attr dir)
+ "Run nix-build.
+ATTR is the attribute to build.
+DIR is the directory containing the Nix default.nix expression."
+ (interactive "sNix attribute: ")
+ (unless dir (setq dir default-directory))
+ (if attr
+ (shell-command (format "nix-build %s -A %s" dir attr))
+ (shell-command (format "nix-build %s" dir))))
+
;;;###autoload
(define-derived-mode nix-mode prog-mode "Nix"
"Major mode for editing Nix expressions.
- [nongnu] elpa/nix-mode e5abdd41e4 352/500: add json-mode dependency, (continued)
- [nongnu] elpa/nix-mode e5abdd41e4 352/500: add json-mode dependency, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ab49f46754 027/500: Redo keymap, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 81e8c3dea6 032/500: cleanup formatting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 09d40e95e2 037/500: Skip braces with hanging indents, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f29d9865e4 055/500: Fixup hanging indents., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 55ed31214a 053/500: Add "in" for closing., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ec0546a41d 051/500: Tweak hanging indent, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0f94476b7e 117/500: nix-syntax-match-antiquote: Handle case where point has the property, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 183d4212e2 134/500: Fix fontification bug, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 42632ee471 168/500: Remove misc/ folder, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 93bfb4428d 182/500: Add nix-build function.,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 9d4eb7d199 274/500: Make find-file-at-point support <nixpkgs>, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 54f28871a3 376/500: Fix issue #70, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ef64fa293b 388/500: Set nix-version to nil, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 218c885d78 414/500: Merge pull request #116 from taku0/update-install-nix-action, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d6e895969b 400/500: Set the 'LD_LIBRARY_PATH' environment variable for mkShell, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c041115673 301/500: Fix failing test., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 01c53b7ff1 289/500: Merge pull request #66 from etu/add-travis-badge, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1d31733ef8 311/500: Add more function documentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode be06d675b8 315/500: Run tests for nix-indent-line and smie-indent-line, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a33ccd4fd7 322/500: Add more issue test cases, ELPA Syncer, 2022/01/29