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
  • Loading branch information
shlevy committed Mar 25, 2017
1 parent 55d21ca commit f087b75
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

1 comment on commit f087b75

@shlevy
Copy link
Member Author

@shlevy shlevy commented on f087b75 Mar 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jlandahl this fixes the bug you told me about your PATH growing indefinitely.

Please sign in to comment.