Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

emacs package setup hook: Fix Fix

A trailing separator in emacs load paths has semantics

cc @Ericson2314 @adisbladis https://github.com/NixOS/nixpkgs/pull/73287

This partially reverts commit ca782498a9532c48d8e12ce402813486ab90e7f0

+4 -2
+4 -2
pkgs/build-support/emacs/setup-hook.sh
··· 1 1 addEmacsVars () { 2 - if [[ -d "$1/share/emacs/site-lisp" ]]; then 3 - export EMACSLOADPATH="$1/share/emacs/site-lisp${EMACSLOADPATH:+:}${EMACSLOADPATH-}" 2 + if test -d $1/share/emacs/site-lisp; then 3 + # it turns out, that the trailing : is actually required 4 + # see https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Search.html 5 + export EMACSLOADPATH="$1/share/emacs/site-lisp:${EMACSLOADPATH-}" 4 6 fi 5 7 } 6 8