diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2016-01-20 12:43:21 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2016-01-20 12:43:21 -0600 |
commit | 2b1024646b42958a874446ec7155cc6c6b247d78 (patch) | |
tree | fbda380d2e75a1175f9e32af944baf42990c6b3b /pkgs/build-support/emacs | |
parent | 97e1258dedf64bc4049d572f5d2e756dd6c5dfa6 (diff) | |
download | nixpkgs-2b1024646b42958a874446ec7155cc6c6b247d78.tar nixpkgs-2b1024646b42958a874446ec7155cc6c6b247d78.tar.gz nixpkgs-2b1024646b42958a874446ec7155cc6c6b247d78.tar.bz2 nixpkgs-2b1024646b42958a874446ec7155cc6c6b247d78.tar.lz nixpkgs-2b1024646b42958a874446ec7155cc6c6b247d78.tar.xz nixpkgs-2b1024646b42958a874446ec7155cc6c6b247d78.tar.zst nixpkgs-2b1024646b42958a874446ec7155cc6c6b247d78.zip |
emacsWithPackages: defer loading package.el
Also stops duplicating load paths.
Diffstat (limited to 'pkgs/build-support/emacs')
-rw-r--r-- | pkgs/build-support/emacs/wrapper.nix | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index 742b2cf5cde..ad1a54886a6 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -68,11 +68,10 @@ stdenv.mkDerivation { fi } - # Add a dependency's paths to site-start.el - addToEmacsPaths() { + # Add a package's paths to site-start.el + addEmacsPackage() { addEmacsPath "exec-path" "$1/bin" addEmacsPath "load-path" "$1/share/emacs/site-lisp" - addEmacsPath "package-directory-list" "$1/share/emacs/site-lisp/elpa" } mkdir -p $out/share/emacs/site-lisp @@ -80,7 +79,6 @@ stdenv.mkDerivation { # NixOS-specific paths. Paths are searched in the reverse of the order # they are specified in, so user and system profile paths are searched last. echo "(load-file \"$emacs/share/emacs/site-lisp/site-start.el\")" >"$siteStart" - echo "(require 'package)" >>"$siteStart" # Set paths for the dependencies of the requested packages. These paths are # searched before the profile paths, but after the explicitly-required paths. @@ -88,14 +86,14 @@ stdenv.mkDerivation { # The explicitly-required packages are also in the list, but we will add # those paths last. if ! ( echo "$explicitRequires" | grep "$pkg" >/dev/null ) ; then - addToEmacsPaths $pkg + addEmacsPackage $pkg fi done # Finally, add paths for all the explicitly-required packages. These paths # will be searched first. for pkg in $explicitRequires; do - addToEmacsPaths $pkg + addEmacsPackage $pkg done # Byte-compiling improves start-up time only slightly, but costs nothing. |