diff options
author | Lin Jian <me@linj.tech> | 2023-08-25 21:48:48 +0800 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-28 15:46:04 +0000 |
commit | f5fbea9761033a847ce91508471ed57f3ae67e95 (patch) | |
tree | bc8f62b75cfe9ea3acef3e73cfd094dae79a9212 /pkgs/build-support/emacs | |
parent | d1d57f39aa1f41d6c45ec256a81ee3a8f05acb7e (diff) |
emacsWithPackages: do not add the wrapper path twice
"$out/share/emacs/site-lisp" is added to load-path in wrapper.sh[1] using EMACSLOADPATH and "$out/share/emacs/native-lisp/" is added to native-comp-eln-load-path in wrapper.sh[2] using EMACSNATIVELOADPATH. There is no point to add them again here. Additionally, the trailing "/" in "$out/share/emacs/native-lisp/" causes duplicate entries in native-comp-eln-load-path: ("/nix/store/hash1-emacs-packages-deps/share/emacs/native-lisp/" ; [3] "/home/user/.emacs.d/eln-cache/" "/nix/store/hash1-emacs-packages-deps/share/emacs/native-lisp" ; [2] "/nix/store/hash2-emacs-29.1-rc1/lib/emacs/29.1/native-lisp/") load-path does not change with this patch applied. [1]: https://github.com/NixOS/nixpkgs/blob/1476c13422db64b12ee879e4f8715ccac3240285/pkgs/build-support/emacs/wrapper.sh#L47 [2]: https://github.com/NixOS/nixpkgs/blob/1476c13422db64b12ee879e4f8715ccac3240285/pkgs/build-support/emacs/wrapper.sh#L50 [3]: https://github.com/NixOS/nixpkgs/blob/1476c13422db64b12ee879e4f8715ccac3240285/pkgs/build-support/emacs/wrapper.nix#L166
Diffstat (limited to 'pkgs/build-support/emacs')
-rw-r--r-- | pkgs/build-support/emacs/wrapper.nix | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index e3c67d03dfa11..bbfc35c94c41c 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -160,11 +160,9 @@ runCommand cat >"$siteStart" <<EOF (let ((inhibit-message t)) (load-file "$emacs/share/emacs/site-lisp/site-start.el")) - (add-to-list 'load-path "$out/share/emacs/site-lisp") + ;; "$out/share/emacs/site-lisp" is added to load-path in wrapper.sh + ;; "$out/share/emacs/native-lisp" is added to native-comp-eln-load-path in wrapper.sh (add-to-list 'exec-path "$out/bin") - ${lib.optionalString withNativeCompilation '' - (add-to-list 'native-comp-eln-load-path "$out/share/emacs/native-lisp/") - ''} ${lib.optionalString withTreeSitter '' (add-to-list 'treesit-extra-load-path "$out/lib/") ''} |