summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/emacs/site-start.el
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/emacs/site-start.el')
-rw-r--r--pkgs/applications/editors/emacs/site-start.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/applications/editors/emacs/site-start.el b/pkgs/applications/editors/emacs/site-start.el
index 86cad1132f64..01a6422d731f 100644
--- a/pkgs/applications/editors/emacs/site-start.el
+++ b/pkgs/applications/editors/emacs/site-start.el
@@ -34,6 +34,25 @@ least specific (the system profile)"
(setenv "EMACSLOADPATH" (when new-env-list
(mapconcat 'identity new-env-list ":"))))))
+(let ((wrapper-site-lisp (getenv "emacsWithPackages_siteLispNative"))
+ (env-load-path (getenv "EMACSNATIVELOADPATH")))
+ (when wrapper-site-lisp
+ (setenv "emacsWithPackages_siteLispNative" nil))
+ (when (and wrapper-site-lisp env-load-path)
+ (let* ((env-list (split-string env-load-path ":"))
+ (new-env-list (delete wrapper-site-lisp env-list)))
+ (setenv "EMACSNATIVELOADPATH" (when new-env-list
+ (mapconcat 'identity new-env-list ":"))))))
+
+;;; Set up native-comp load path.
+(when (featurep 'comp)
+ ;; Append native-comp subdirectories from `NIX_PROFILES'.
+ (setq comp-eln-load-path
+ (append (mapcar (lambda (profile-dir)
+ (concat profile-dir "/share/emacs/native-lisp/"))
+ (nix--profile-paths))
+ comp-eln-load-path)))
+
;;; Make `woman' find the man pages
(defvar woman-manpath)
(eval-after-load 'woman