Skip to content

Commit

Permalink
nix-buffer support: Make process-environment changes actually local
Browse files Browse the repository at this point in the history
(cherry picked from commit f087b75)
  • Loading branch information
shlevy committed Mar 25, 2017
1 parent 3a0a58c commit 818c0e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/build-support/emacs/buffer.nix
Expand Up @@ -39,6 +39,8 @@
(make-local-variable 'process-environment)
(put 'process-environment 'permanent-local t)
(inherit-local 'process-environment)
; setenv modifies in place, so copy the environment first
(setq process-environment (copy-tree process-environment))
(setenv "PATH" (concat "${lib.makeSearchPath "bin" pkgs}:" (getenv "PATH")))
(inherit-local-permanent exec-path (append '(${builtins.concatStringsSep " " (map (p: "\"${p}/bin\"") pkgs)}) exec-path))
Expand Down

0 comments on commit 818c0e2

Please sign in to comment.