2020-04-24 23:36:52 +00:00
|
|
|
# trivial builder for Emacs packages
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
{ callPackage, lib, ... }@envargs:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
args:
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
callPackage ./generic.nix envargs ({
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
2023-05-24 13:37:59 +00:00
|
|
|
emacs --batch -l package --eval "(package-generate-autoloads \"${args.pname}\" \"$LISPDIR\")"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|
|
|
|
// args)
|