2014-01-21 00:57:04 +01:00
|
|
|
# trivial builder for Emacs packages
|
|
|
|
|
2021-01-26 15:57:21 +01:00
|
|
|
{ callPackage, lib, ... }@envargs:
|
2014-01-21 00:57:04 +01:00
|
|
|
|
|
|
|
args:
|
|
|
|
|
2021-01-26 15:57:21 +01:00
|
|
|
callPackage ./generic.nix envargs ({
|
2014-01-21 00:57:04 +01:00
|
|
|
buildPhase = ''
|
2018-11-27 06:23:04 +01:00
|
|
|
runHook preBuild
|
2014-01-21 00:57:04 +01:00
|
|
|
|
|
|
|
emacs -L . --batch -f batch-byte-compile *.el
|
|
|
|
|
2018-11-27 06:23:04 +01:00
|
|
|
runHook postBuild
|
2014-01-21 00:57:04 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-11-27 06:23:04 +01:00
|
|
|
runHook preInstall
|
2014-01-21 00:57:04 +01:00
|
|
|
|
|
|
|
LISPDIR=$out/share/emacs/site-lisp
|
|
|
|
install -d $LISPDIR
|
|
|
|
install *.el *.elc $LISPDIR
|
2023-05-12 06:48:28 +02:00
|
|
|
emacs --batch -l package --eval "(package-generate-autoloads \"${args.pname}\" \"$LISPDIR\")"
|
2014-01-21 00:57:04 +01:00
|
|
|
|
2018-11-27 06:23:04 +01:00
|
|
|
runHook postInstall
|
2014-01-21 00:57:04 +01:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
|
|
|
|
// args)
|