From e675cc064f896795f5ca2d98790601d2b95ed0b2 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 30 Mar 2025 15:16:06 +0800 Subject: [PATCH] emacs: make trivialBuild respect error tunables at bytecompile time This is a follow-up of 2f7cc5a7812bd4b4758312051a72b0a618072cd4. --- pkgs/applications/editors/emacs/build-support/trivial.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/emacs/build-support/trivial.nix b/pkgs/applications/editors/emacs/build-support/trivial.nix index f95b6f3cdfc3..b37dfcccfb63 100644 --- a/pkgs/applications/editors/emacs/build-support/trivial.nix +++ b/pkgs/applications/editors/emacs/build-support/trivial.nix @@ -19,7 +19,12 @@ lib.extendMkDerivation { foundMakefile=1 fi - emacs -l package -f package-initialize -L . --batch -f batch-byte-compile *.el + 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 '';