about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-08-24 18:00:52 +0000
committerGitHub <noreply@github.com>2023-08-24 18:00:52 +0000
commitabaaf09a76b8ef4f8c2ae938f1df59e6bac07609 (patch)
tree042a36b35fa940db8eb815a8cdcaaf43fd52eeed /pkgs/build-support
parent432839113250d0119f626730a9bd6a1a9f7a48fa (diff)
parent2ece2a0701055e8093b3ab9f904e86b4c396e712 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/emacs/buffer.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/build-support/emacs/buffer.nix b/pkgs/build-support/emacs/buffer.nix
index b8bd4584e3227..48a7996916e8d 100644
--- a/pkgs/build-support/emacs/buffer.nix
+++ b/pkgs/build-support/emacs/buffer.nix
@@ -15,16 +15,16 @@ rec {
       (when (eq nixpkgs--buffer-count 0)
         (make-variable-buffer-local 'nixpkgs--is-nixpkgs-buffer)
         ; When generating a new temporary buffer (one whose name starts with a space), do inherit-local inheritance and make it a nixpkgs buffer
-        (defun nixpkgs--around-generate (orig name)
+        (defun nixpkgs--around-generate (orig name &optional ibh)
           (if (and nixpkgs--is-nixpkgs-buffer (eq (aref name 0) ?\s))
-              (let ((buf (funcall orig name)))
+              (let ((buf (funcall orig name ibh)))
                 (progn
                   (inherit-local-inherit-child buf)
                   (with-current-buffer buf
                     (setq nixpkgs--buffer-count (1+ nixpkgs--buffer-count))
                     (add-hook 'kill-buffer-hook 'nixpkgs--decrement-buffer-count nil t)))
                 buf)
-            (funcall orig name)))
+            (funcall orig name ibh)))
         (advice-add 'generate-new-buffer :around #'nixpkgs--around-generate)
         ; When we have no more nixpkgs buffers, tear down the buffer handling
         (defun nixpkgs--decrement-buffer-count ()
@@ -45,7 +45,7 @@ rec {
       (setenv "PATH" (concat "${lib.makeSearchPath "bin" pkgs}:" (getenv "PATH")))
       (inherit-local-permanent exec-path (append '(${builtins.concatStringsSep " " (map (p: "\"${p}/bin\"") pkgs)}) exec-path))
 
-      (inherit-local-permanent eshell-path-env (concat "${lib.makeSearchPath "bin" pkgs}:" eshell-path-env))
+      (inherit-local-permanent eshell-path-env (concat "${lib.makeSearchPath "bin" pkgs}:" (if (boundp 'eshell-path-env) eshell-path-env (getenv "PATH"))))
 
       (setq nixpkgs--is-nixpkgs-buffer t)
       (inherit-local 'nixpkgs--is-nixpkgs-buffer)