emacs: adapt to renamed native-comp variables

This commit is contained in:
Mauricio Collares 2021-05-06 16:44:43 -03:00
parent d3ba49889a
commit 67bbabc0a4
3 changed files with 7 additions and 7 deletions

View File

@ -94,8 +94,8 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
])); ]));
in '' in ''
substituteInPlace lisp/emacs-lisp/comp.el --replace \ substituteInPlace lisp/emacs-lisp/comp.el --replace \
"(defcustom comp-native-driver-options nil" \ "(defcustom native-comp-driver-options nil" \
"(defcustom comp-native-driver-options '(${backendPath})" "(defcustom native-comp-driver-options '(${backendPath})"
'')) ''))
"" ""
]; ];
@ -175,7 +175,7 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
(comp-trampoline-compile (intern (pop argv))))" (comp-trampoline-compile (intern (pop argv))))"
mkdir -p $out/share/emacs/native-lisp mkdir -p $out/share/emacs/native-lisp
$out/bin/emacs --batch \ $out/bin/emacs --batch \
--eval "(add-to-list 'comp-eln-load-path \"$out/share/emacs/native-lisp\")" \ --eval "(add-to-list 'native-comp-eln-load-path \"$out/share/emacs/native-lisp\")" \
-f batch-native-compile $out/share/emacs/site-lisp/site-start.el -f batch-native-compile $out/share/emacs/site-lisp/site-start.el
''; '';

View File

@ -47,11 +47,11 @@ least specific (the system profile)"
;;; Set up native-comp load path. ;;; Set up native-comp load path.
(when (featurep 'comp) (when (featurep 'comp)
;; Append native-comp subdirectories from `NIX_PROFILES'. ;; Append native-comp subdirectories from `NIX_PROFILES'.
(setq comp-eln-load-path (setq native-comp-eln-load-path
(append (mapcar (lambda (profile-dir) (append (mapcar (lambda (profile-dir)
(concat profile-dir "/share/emacs/native-lisp/")) (concat profile-dir "/share/emacs/native-lisp/"))
(nix--profile-paths)) (nix--profile-paths))
comp-eln-load-path))) native-comp-eln-load-path)))
;;; Make `woman' find the man pages ;;; Make `woman' find the man pages
(defvar woman-manpath) (defvar woman-manpath)

View File

@ -159,7 +159,7 @@ runCommand
(add-to-list 'load-path "$out/share/emacs/site-lisp") (add-to-list 'load-path "$out/share/emacs/site-lisp")
(add-to-list 'exec-path "$out/bin") (add-to-list 'exec-path "$out/bin")
${optionalString nativeComp '' ${optionalString nativeComp ''
(add-to-list 'comp-eln-load-path "$out/share/emacs/native-lisp/") (add-to-list 'native-comp-eln-load-path "$out/share/emacs/native-lisp/")
''} ''}
EOF EOF
# Link subdirs.el from the emacs distribution # Link subdirs.el from the emacs distribution
@ -170,7 +170,7 @@ runCommand
${optionalString nativeComp '' ${optionalString nativeComp ''
$emacs/bin/emacs --batch \ $emacs/bin/emacs --batch \
--eval "(add-to-list 'comp-eln-load-path \"$out/share/emacs/native-lisp/\")" \ --eval "(add-to-list 'native-comp-eln-load-path \"$out/share/emacs/native-lisp/\")" \
-f batch-native-compile "$siteStart" "$subdirs" -f batch-native-compile "$siteStart" "$subdirs"
''} ''}
''; '';