diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-04-17 20:29:43 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-04-17 20:29:43 +0200 |
commit | 70d726c2a51ee60015b68d6c3b40de55fa59cc9c (patch) | |
tree | a83469ae1fb44ebc71c7143b1fc5332148194f78 /pkgs/build-support | |
parent | f6bedc13d16a03565d11663a7df937102bc44535 (diff) | |
parent | 212dde2609b3011da6f7ba65b45a002fcc40ea7e (diff) | |
download | nixpkgs-70d726c2a51ee60015b68d6c3b40de55fa59cc9c.tar nixpkgs-70d726c2a51ee60015b68d6c3b40de55fa59cc9c.tar.gz nixpkgs-70d726c2a51ee60015b68d6c3b40de55fa59cc9c.tar.bz2 nixpkgs-70d726c2a51ee60015b68d6c3b40de55fa59cc9c.tar.lz nixpkgs-70d726c2a51ee60015b68d6c3b40de55fa59cc9c.tar.xz nixpkgs-70d726c2a51ee60015b68d6c3b40de55fa59cc9c.tar.zst nixpkgs-70d726c2a51ee60015b68d6c3b40de55fa59cc9c.zip |
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/emacs/wrapper.nix | 9 | ||||
-rw-r--r-- | pkgs/build-support/emacs/wrapper.sh | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index 2aa61d6d2f6..207908fb606 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -135,9 +135,14 @@ runCommand ''} } + siteAutoloads="$out/share/emacs/site-lisp/nix-generated-autoload.el" + touch $siteAutoloads + # Iterate over the array of inputs (avoiding nix's own interpolation) for pkg in "''${requires[@]}"; do linkEmacsPackage $pkg + find $pkg -name "*-autoloads.el" \ + -exec echo \(load \"{}\" \'noerror \'nomessage\) \; >> $siteAutoloads done siteStart="$out/share/emacs/site-lisp/site-start.el" @@ -174,12 +179,12 @@ runCommand > "$subdirs" # Byte-compiling improves start-up time only slightly, but costs nothing. - $emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" "$subdirs" + $emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" "$subdirs" "$siteAutoloads" ${optionalString nativeComp '' $emacs/bin/emacs --batch \ --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" "$siteAutoloads" ''} ''; diff --git a/pkgs/build-support/emacs/wrapper.sh b/pkgs/build-support/emacs/wrapper.sh index e8eecb8c869..6c5a5aee2a8 100644 --- a/pkgs/build-support/emacs/wrapper.sh +++ b/pkgs/build-support/emacs/wrapper.sh @@ -44,4 +44,4 @@ export emacsWithPackages_siteLisp=@wrapperSiteLisp@ export EMACSNATIVELOADPATH="${newNativeLoadPath[*]}" export emacsWithPackages_siteLispNative=@wrapperSiteLispNative@ -exec @prog@ "$@" +exec @prog@ -l cl-loaddefs -l nix-generated-autoload "$@" |