Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
# trivial builder for Emacs packages
|
|
|
|
{ callPackage, lib, ... }@envargs:
|
|
|
|
lib.extendMkDerivation {
|
|
constructDrv = callPackage ./generic.nix envargs;
|
|
extendDrvArgs =
|
|
finalAttrs:
|
|
|
|
args:
|
|
|
|
{
|
|
buildPhase =
|
|
args.buildPhase or ''
|
|
runHook preBuild
|
|
|
|
# This is modified from stdenv buildPhase. foundMakefile is used in stdenv checkPhase.
|
|
if [[ ! ( -z "''${makeFlags-}" && -z "''${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ) ]]; then
|
|
foundMakefile=1
|
|
fi
|
|
|
|
emacs -l package -f package-initialize \
|
|
--eval "(setq byte-compile-debug ${if finalAttrs.ignoreCompilationError then "nil" else "t"})" \
|
|
--eval "(setq byte-compile-error-on-warn ${
|
|
if finalAttrs.turnCompilationWarningToError then "t" else "nil"
|
|
})" \
|
|
-L . --batch -f batch-byte-compile *.el
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase =
|
|
args.installPhase or ''
|
|
runHook preInstall
|
|
|
|
LISPDIR=$out/share/emacs/site-lisp
|
|
install -d $LISPDIR
|
|
install *.el *.elc $LISPDIR
|
|
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
|
|
}
|