[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 0c2807f037 262/500: Cleanup nix-build.el
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 0c2807f037 262/500: Cleanup nix-build.el |
Date: |
Sat, 29 Jan 2022 08:27:12 -0500 (EST) |
branch: elpa/nix-mode
commit 0c2807f037c3372363f59c626b2f305e32e685d7
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Cleanup nix-build.el
---
nix-build.el | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/nix-build.el b/nix-build.el
index 0bea996f4a..df85a676d6 100644
--- a/nix-build.el
+++ b/nix-build.el
@@ -1,4 +1,4 @@
-;;; nix.el -- run nix commands in Emacs -*- lexical-binding: t -*-
+;;; nix-build.el -- run nix commands in Emacs -*- lexical-binding: t -*-
;; Author: Matthew Bauer <mjbauer95@gmail.com>
;; Homepage: https://github.com/NixOS/nix-mode
@@ -8,21 +8,20 @@
;;; Commentary:
-;; To use this just run:
-
-;; M-x RET nix-shell RET
-
-;; This will give you some
-
;;; Code:
(require 'nix)
(require 'nix-search)
-(defun nix-build (&optional attr)
- "Run nix-build in a compilation buffer."
- (interactive (list (nix-search-read-attr "./.")))
- (setq compile-command (format "%s -A '%s'" nix-build-executable attr))
+(defun nix-build (&optional file attr)
+ "Run nix-build in a compilation buffer.
+FILE the file to parse.
+ATTR the attribute to build."
+ (interactive (list (nix-read-file) nil))
+ (unless attr (setq attr (nix-read-attr file)))
+
+ (setq compile-command (format "%s %s -A '%s'" nix-build-executable
+ file attr))
(setq-default compilation-directory default-directory)
(compilation-start compile-command nil
(apply-partially (lambda (attr _)
- [nongnu] elpa/nix-mode 429a92a59e 225/500: Group configs in nix-shell, (continued)
- [nongnu] elpa/nix-mode 429a92a59e 225/500: Group configs in nix-shell, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a4e6560902 223/500: Add nix-instantiate.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 00d099602a 226/500: Fix linter warning, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode cfdeffd066 228/500: Add new files to Cask, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5aaf80392f 231/500: Avoid recursive loop, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 3aeec264e0 236/500: nix-search: add nix-search-read-attr, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode fea066cec6 241/500: Fix run phase, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6532fcf244 244/500: Don’t expand nix-file in nix-shell., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 097b7bb992 257/500: Add nix-build.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a6571fa877 260/500: Add nix-log.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0c2807f037 262/500: Cleanup nix-build.el,
ELPA Syncer <=
- [nongnu] elpa/nix-mode b62c395b65 264/500: Remove nix-shell-haskell.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1dd112e5cf 267/500: Fix function used as variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f1973ceb4b 269/500: Add .nix to auto-mode-alist, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1389a6b25a 275/500: Fix flycheck warnings, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 95ef285e74 277/500: Update .nix script, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1ade7b76bd 282/500: ert/indent: Add testcase for contents of lists, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 02b59d9bcf 283/500: ert/indent: Add testcases for issues reported in #60, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode bb602e160f 286/500: Cleanups, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7526a43ea0 292/500: tests: Rename test for consistency with the rest, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aa47e0c5ae 302/500: Fix indentation of lambdas starting at bol., ELPA Syncer, 2022/01/29