mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
3618d1d247
- Remove superflous `let` with `defaultMeta` These can just be assigned to meta directly instead. - Hoist internal intermediate derivation - Remove top-level `with lib` - Inherit `lib`/`builtins` into scopes
28 lines
518 B
Nix
28 lines
518 B
Nix
# 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
|
|
'';
|
|
}
|
|
|
|
// args)
|