nixpkgs/pkgs/build-support/emacs/trivial.nix
Jan Malakhovski e4a4e109ba refactor Emacs packages'/modes' builders
This simplifies melpa builder by merging with it my old emacs modes builder,
adds better instructions and support for overrides in emacs-packages.nix,
and renames some emacs-related stuff in all-packages.nix for sanity reasons.

I declare this backwards compatible since direct uses of emacsPackages in
configuration.nix are very unlikely.
2015-03-03 16:02:15 +00:00

35 lines
553 B
Nix

# trivial builder for Emacs packages
{ lib, ... }@envargs:
with lib;
args:
import ./generic.nix envargs ({
#preConfigure = ''
# export LISPDIR=$out/share/emacs/site-lisp
# export VERSION_SPECIFIC_LISPDIR=$out/share/emacs/site-lisp
#'';
buildPhase = ''
eval "$preBuild"
emacs -L . --batch -f batch-byte-compile *.el
eval "$postBuild"
'';
installPhase = ''
eval "$preInstall"
LISPDIR=$out/share/emacs/site-lisp
install -d $LISPDIR
install *.el *.elc $LISPDIR
eval "$postInstall"
'';
}
// args)