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