about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-12-07 18:53:54 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-06 12:13:05 +0000
commit9e283958d6bb9c91a6fdb7c8b269729b0af6d620 (patch)
tree2984739232ebe173304567d49a1f58c25ea1d255 /nixpkgs/pkgs/build-support
parentbeaedc33b414d3be42006801c30ce5ccfc1c55af (diff)
downloadnixlib-9e283958d6bb9c91a6fdb7c8b269729b0af6d620.tar
nixlib-9e283958d6bb9c91a6fdb7c8b269729b0af6d620.tar.gz
nixlib-9e283958d6bb9c91a6fdb7c8b269729b0af6d620.tar.bz2
nixlib-9e283958d6bb9c91a6fdb7c8b269729b0af6d620.tar.lz
nixlib-9e283958d6bb9c91a6fdb7c8b269729b0af6d620.tar.xz
nixlib-9e283958d6bb9c91a6fdb7c8b269729b0af6d620.tar.zst
nixlib-9e283958d6bb9c91a6fdb7c8b269729b0af6d620.zip
emacsWithPackages: don't tell sub-Emacs about pkgs
If I'm running an Emacs executable from emacsWithPackages as my main
programming environment, and I'm hacking on Emacs, or the Emacs
packaging in Nixpkgs, or whatever, I don't want the Emacs packages
from the wrapper to show up in the load path of that child Emacs.  It
results in differing behaviour depending on whether the child Emacs is
run from Emacs or from, for example, an external terminal emulator,
which is very surprising.

To avoid this, pass another environment variable containing the
wrapper site-lisp path, and use that value to remove the corresponding
entry in EMACSLOADPATH, so it won't be propagated to child Emacsen.
Diffstat (limited to 'nixpkgs/pkgs/build-support')
-rw-r--r--nixpkgs/pkgs/build-support/emacs/wrapper.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/emacs/wrapper.sh b/nixpkgs/pkgs/build-support/emacs/wrapper.sh
index 3c011b7f1364..6e0451fc1d4f 100644
--- a/nixpkgs/pkgs/build-support/emacs/wrapper.sh
+++ b/nixpkgs/pkgs/build-support/emacs/wrapper.sh
@@ -22,5 +22,6 @@ else
 fi
 
 export EMACSLOADPATH="${newLoadPath[*]}"
+export emacsWithPackages_siteLisp=@wrapperSiteLisp@
 
 exec @prog@ "$@"