1 # trivial builder for Emacs packages
3 { callPackage, lib, ... }@envargs:
6 libBuildHelper = import ./lib-build-helper.nix;
9 libBuildHelper.extendMkDerivation' (callPackage ./generic.nix envargs) (finalAttrs:
14 buildPhase = args.buildPhase or ''
17 # This is modified from stdenv buildPhase. foundMakefile is used in stdenv checkPhase.
18 if [[ ! ( -z "''${makeFlags-}" && -z "''${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ) ]]; then
22 emacs -l package -f package-initialize -L . --batch -f batch-byte-compile *.el
27 installPhase = args.installPhase or ''
30 LISPDIR=$out/share/emacs/site-lisp
32 install *.el *.elc $LISPDIR