From 9a86a53ec5104966717a4963e3f759304120e6c9 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sun, 19 Dec 2021 08:04:56 -0800 Subject: [PATCH 1/2] emacs: Ignore large file warnings for native compilation This was blocking building phps-mode with native compilation enabled. --- pkgs/build-support/emacs/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/emacs/generic.nix b/pkgs/build-support/emacs/generic.nix index ef154982ad06..1b81dbcf9ed7 100644 --- a/pkgs/build-support/emacs/generic.nix +++ b/pkgs/build-support/emacs/generic.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation ({ find $out/share/emacs -type f -name '*.el' -print0 \ | xargs -0 -n 1 -I {} -P $NIX_BUILD_CORES sh -c \ - "emacs --batch -f batch-native-compile {} || true" + "emacs --batch --eval '(setq large-file-warning-threshold nil)' -f batch-native-compile {} || true" ''; } From 4192dce5385453340ee6ba0dc664ddbfa99d55b5 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sun, 19 Dec 2021 08:07:18 -0800 Subject: [PATCH 2/2] melpa2nix: Ignore large file warnings While we haven't encountered any problems related to this in MELPA it's just a matter of time (this just happened for an ELPA package (phps-mode)). --- pkgs/build-support/emacs/melpa2nix.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/build-support/emacs/melpa2nix.el b/pkgs/build-support/emacs/melpa2nix.el index bd2aadd5aeb5..383423af0818 100644 --- a/pkgs/build-support/emacs/melpa2nix.el +++ b/pkgs/build-support/emacs/melpa2nix.el @@ -8,6 +8,9 @@ (setq package-build-archive-dir (expand-file-name "packages/")) (setq package-build-recipes-dir (expand-file-name "recipes/")) +;; Allow installing package tarfiles larger than 10MB +(setq large-file-warning-threshold nil) + (defun melpa2nix-build-package () (if (not noninteractive) (error "`melpa2nix-build-package' is to be used only with -batch"))