diff options
author | Mohammed Yaseen Mowzer <yaseen@mowzer.co.za> | 2019-02-02 15:04:29 +0200 |
---|---|---|
committer | Mohammed Yaseen Mowzer <yaseen@mowzer.co.za> | 2019-02-02 15:37:13 +0200 |
commit | d17d18ad81c07af2646a631e9ed129c54871b7a7 (patch) | |
tree | 71a3b2d8f8db4ab41edd234925a59a6d79ffba18 /pkgs/build-support/emacs | |
parent | 230d55edc8120af49000a95bde23e5b1a424d456 (diff) | |
download | nixpkgs-d17d18ad81c07af2646a631e9ed129c54871b7a7.tar nixpkgs-d17d18ad81c07af2646a631e9ed129c54871b7a7.tar.gz nixpkgs-d17d18ad81c07af2646a631e9ed129c54871b7a7.tar.bz2 nixpkgs-d17d18ad81c07af2646a631e9ed129c54871b7a7.tar.lz nixpkgs-d17d18ad81c07af2646a631e9ed129c54871b7a7.tar.xz nixpkgs-d17d18ad81c07af2646a631e9ed129c54871b7a7.tar.zst nixpkgs-d17d18ad81c07af2646a631e9ed129c54871b7a7.zip |
emacs: Link subdirs.el into emacs-packages-deps
Emacs loads all the elisp files in the top-level of the site-lisp directory. However some packages (e.g. mu4e) put their elisp files in a subdirectory of site-lisp. Emacs will not load these packages unless subdirs.el is present. This commit links the subdirs.el file from the emacs package into the emacs-package-deps package so that packages that put their elisp files in a subdirectory of site-lisp are loaded.
Diffstat (limited to 'pkgs/build-support/emacs')
-rw-r--r-- | pkgs/build-support/emacs/wrapper.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index e161daffbd3..dfdd5b60851 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -121,21 +121,25 @@ stdenv.mkDerivation { siteStart="$out/share/emacs/site-lisp/site-start.el" siteStartByteCompiled="$siteStart"c + subdirs="$out/share/emacs/site-lisp/subdirs.el" + subdirsByteCompiled="$subdirs"c - # A dependency may have brought the original siteStart, delete it and - # create our own + # A dependency may have brought the original siteStart or subdirs, delete + # it and create our own # Begin the new site-start.el by loading the original, which sets some # 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. - rm -f $siteStart $siteStartByteCompiled + rm -f $siteStart $siteStartByteCompiled $subdirs $subdirsByteCompiled cat >"$siteStart" <<EOF (load-file "$emacs/share/emacs/site-lisp/site-start.el") (add-to-list 'load-path "$out/share/emacs/site-lisp") (add-to-list 'exec-path "$out/bin") EOF + # Link subdirs.el from the emacs distribution + ln -s $emacs/share/emacs/site-lisp/subdirs.el -T $subdirs # Byte-compiling improves start-up time only slightly, but costs nothing. - $emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" + $emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" "$subdirs" ''; phases = [ "installPhase" ]; |