diff options
Diffstat (limited to 'pkgs/build-support/emacs/wrapper.sh')
-rw-r--r-- | pkgs/build-support/emacs/wrapper.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/build-support/emacs/wrapper.sh b/pkgs/build-support/emacs/wrapper.sh index 96c9a8a60ea4..e8eecb8c8696 100644 --- a/pkgs/build-support/emacs/wrapper.sh +++ b/pkgs/build-support/emacs/wrapper.sh @@ -3,6 +3,7 @@ IFS=: newLoadPath=() +newNativeLoadPath=() added= if [[ -n $EMACSLOADPATH ]] @@ -21,7 +22,26 @@ else newLoadPath+=("") fi +if [[ -n $EMACSNATIVELOADPATH ]] +then + while read -rd: entry + do + if [[ -z $entry && -z $added ]] + then + newNativeLoadPath+=(@wrapperSiteLispNative@) + added=1 + fi + newNativeLoadPath+=("$entry") + done <<< "$EMACSNATIVELOADPATH:" +else + newNativeLoadPath+=(@wrapperSiteLispNative@) + newNativeLoadPath+=("") +fi + export EMACSLOADPATH="${newLoadPath[*]}" export emacsWithPackages_siteLisp=@wrapperSiteLisp@ +export EMACSNATIVELOADPATH="${newNativeLoadPath[*]}" +export emacsWithPackages_siteLispNative=@wrapperSiteLispNative@ + exec @prog@ "$@" |