From f087b7594150998652f6b7945b0ca86bceba9e79 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 25 Mar 2017 11:13:25 -0400 Subject: nix-buffer support: Make process-environment changes actually local --- pkgs/build-support/emacs/buffer.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/emacs/buffer.nix b/pkgs/build-support/emacs/buffer.nix index 1cbac0709a66..6c5e0570fd0d 100644 --- a/pkgs/build-support/emacs/buffer.nix +++ b/pkgs/build-support/emacs/buffer.nix @@ -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)) -- cgit 1.4.1