core/pkgs/build-support/emacs/trivial.nix

29 lines
520 B
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
# trivial builder for Emacs packages
{ callPackage, lib, ... }@envargs:
args:
callPackage ./generic.nix envargs ({
buildPhase = ''
runHook preBuild
emacs -L . --batch -f batch-byte-compile *.el
runHook postBuild
'';
installPhase = ''
runHook preInstall
LISPDIR=$out/share/emacs/site-lisp
install -d $LISPDIR
install *.el *.elc $LISPDIR
emacs --batch -l package --eval "(package-generate-autoloads \"${args.pname}\" \"$LISPDIR\")"
runHook postInstall
'';
}
2024-05-13 21:24:10 +00:00
// args)