diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-08-25 18:00:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 18:00:58 +0000 |
commit | e79f8fd11834d4567c97dab690fc000a83a0e47d (patch) | |
tree | f3f0e4a32cb74c810459447467c295c90f7719da /pkgs/build-support | |
parent | 8680fe99a1c71d90cd8875da37d57b9f883de725 (diff) | |
parent | 5cf3fa6186e81451a9af26289d7cdf4ccc58f916 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/emacs/wrapper.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/emacs/wrapper.sh | 16 |
2 files changed, 13 insertions, 7 deletions
diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index ecfcc0cd52c5f..e3c67d03dfa11 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -200,7 +200,7 @@ runCommand substitute ${./wrapper.sh} $out/bin/$progname \ --subst-var-by bash ${emacs.stdenv.shell} \ --subst-var-by wrapperSiteLisp "$deps/share/emacs/site-lisp" \ - --subst-var-by wrapperSiteLispNative "$deps/share/emacs/native-lisp:" \ + --subst-var-by wrapperSiteLispNative "$deps/share/emacs/native-lisp" \ --subst-var prog chmod +x $out/bin/$progname done @@ -219,7 +219,7 @@ runCommand substitute ${./wrapper.sh} $out/Applications/Emacs.app/Contents/MacOS/Emacs \ --subst-var-by bash ${emacs.stdenv.shell} \ --subst-var-by wrapperSiteLisp "$deps/share/emacs/site-lisp" \ - --subst-var-by wrapperSiteLispNative "$deps/share/emacs/native-lisp:" \ + --subst-var-by wrapperSiteLispNative "$deps/share/emacs/native-lisp" \ --subst-var-by prog "$emacs/Applications/Emacs.app/Contents/MacOS/Emacs" chmod +x $out/Applications/Emacs.app/Contents/MacOS/Emacs fi diff --git a/pkgs/build-support/emacs/wrapper.sh b/pkgs/build-support/emacs/wrapper.sh index e8eecb8c86966..44762bd4582b0 100644 --- a/pkgs/build-support/emacs/wrapper.sh +++ b/pkgs/build-support/emacs/wrapper.sh @@ -4,16 +4,17 @@ IFS=: newLoadPath=() newNativeLoadPath=() -added= +addedNewLoadPath= +addedNewNativeLoadPath= if [[ -n $EMACSLOADPATH ]] then while read -rd: entry do - if [[ -z $entry && -z $added ]] + if [[ -z $entry && -z $addedNewLoadPath ]] then newLoadPath+=(@wrapperSiteLisp@) - added=1 + addedNewLoadPath=1 fi newLoadPath+=("$entry") done <<< "$EMACSLOADPATH:" @@ -22,14 +23,19 @@ else newLoadPath+=("") fi +# NOTE: Even though we treat EMACSNATIVELOADPATH like EMACSLOADPATH in +# this wrapper, empty elements in EMACSNATIVELOADPATH have no special +# meaning for Emacs. Only non-empty elements in EMACSNATIVELOADPATH +# will be prepended to native-comp-eln-load-path. +# https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/startup.el?id=3685387e609753293c4518be75e77c659c3b2d8d#n599 if [[ -n $EMACSNATIVELOADPATH ]] then while read -rd: entry do - if [[ -z $entry && -z $added ]] + if [[ -z $entry && -z $addedNewNativeLoadPath ]] then newNativeLoadPath+=(@wrapperSiteLispNative@) - added=1 + addedNewNativeLoadPath=1 fi newNativeLoadPath+=("$entry") done <<< "$EMACSNATIVELOADPATH:" |