[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 429a92a59e 225/500: Group configs in nix-shell
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 429a92a59e 225/500: Group configs in nix-shell |
Date: |
Sat, 29 Jan 2022 08:27:08 -0500 (EST) |
branch: elpa/nix-mode
commit 429a92a59e362487b3cc41c41daf09ab337e5571
Author: Matthew Bauer <matthew.bauer@obsidian.systems>
Commit: Matthew Bauer <matthew.bauer@obsidian.systems>
Group configs in nix-shell
---
nix-shell.el | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/nix-shell.el b/nix-shell.el
index 2f6bba85ab..349a287adc 100644
--- a/nix-shell.el
+++ b/nix-shell.el
@@ -18,11 +18,16 @@
(require 'nix)
(require 'nix-instantiate)
+(require 'nix-store)
+
+(defgroup nix-shell nil
+ "All nix-shell options."
+ :group 'nix)
(defcustom nix-shell-file nil
"Set to the file to run the nix-shell for."
:type 'string
- :group 'nix)
+ :group 'nix-shell)
(defcustom nix-shell-inputs '(depsBuildBuild
depsBuildBuildPropagated
@@ -32,13 +37,18 @@
depsBuildTargetPropagated)
"List of inputs to collect for nix-shell."
:type 'list
- :group 'nix)
+ :group 'nix-shell)
(defcustom nix-shell-clear-environment nil
"Whether to clear the old ‘exec-path’ & environment.
Similar to ‘--pure’ argument in command line nix-shell."
:type 'boolean
- :group 'nix)
+ :group 'nix-shell)
+
+(defcustom nix-shell-auto-realise t
+ "Whether we can realise paths in the built .drv file."
+ :type 'boolean
+ :group 'nix-shell)
(defun nix-shell--callback (buffer drv)
"Run the nix-shell callback to setup the buffer.
@@ -62,7 +72,7 @@ The DRV file to use."
;; Make sure this .drv file can actually be built here.
(unless (string= system (nix-system))
(error
- "Your system (%s) does not match the target system (%s)"
+ "Your system (%s) does not match .drv’s build system (%s)"
(nix-system) system))
(with-current-buffer buffer
@@ -73,7 +83,9 @@ The DRV file to use."
)
(dolist (input inputs)
- (unless (file-directory-p input) (nix-store-realise input))
+ (when (and (not (file-directory-p input))
+ nix-shell-auto-realise)
+ (nix-store-realise input))
(let ((bin (expand-file-name "bin" input))
(man (expand-file-name "share/man" input))
- [nongnu] elpa/nix-mode 1359b4ac3b 161/500: Add CHANGELOG, (continued)
- [nongnu] elpa/nix-mode 1359b4ac3b 161/500: Add CHANGELOG, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d5e839692a 160/500: Fix byte-compile, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 895f88eff4 174/500: Add abbrev table, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0fde15d938 197/500: Prefix unused lexical argument to avoid byte-compilation warning, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 478de28a4e 186/500: Make nix-build use async-shell-command, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ecee0e39e9 150/500: Add second options for nix-shell, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f24abeb736 205/500: Don’t prompt with nix-build, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a820e9adad 210/500: Add electric indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e298244f55 222/500: Add nix-search.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 149d924f6f 221/500: Add nix-store.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 429a92a59e 225/500: Group configs in nix-shell,
ELPA Syncer <=
- [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, 2022/01/29