mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
31 lines
529 B
Nix
31 lines
529 B
Nix
# trivial builder for Emacs packages
|
|
|
|
{ callPackage, lib, ... }@envargs:
|
|
|
|
with lib;
|
|
|
|
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
|
|
'';
|
|
}
|
|
|
|
// args)
|