diff --git a/pkgs/applications/editors/emacs/build-support/generic.nix b/pkgs/applications/editors/emacs/build-support/generic.nix index d22e6495c1d2..9f1b2308cc43 100644 --- a/pkgs/applications/editors/emacs/build-support/generic.nix +++ b/pkgs/applications/editors/emacs/build-support/generic.nix @@ -90,6 +90,7 @@ libBuildHelper.extendMkDerivation' stdenv.mkDerivation (finalAttrs: | xargs --verbose -0 -I {} -n 1 -P $NIX_BUILD_CORES sh -c \ "emacs \ --batch \ + --eval '(setq native-comp-eln-load-path (cdr native-comp-eln-load-path))' \ --eval '(setq large-file-warning-threshold nil)' \ --eval '(setq byte-compile-error-on-warn ${if finalAttrs.turnCompilationWarningToError then "t" else "nil"})' \ -f batch-native-compile {} \ diff --git a/pkgs/applications/editors/emacs/elisp-packages/lib-override-helper.nix b/pkgs/applications/editors/emacs/elisp-packages/lib-override-helper.nix index 74d185641e3d..fb1f412299f7 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/lib-override-helper.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/lib-override-helper.nix @@ -25,4 +25,14 @@ rec { broken = true; }; }); + + mkHome = + pkg: + pkg.overrideAttrs (previousAttrs: { + preInstall = + '' + HOME=$(mktemp -d) + '' + + previousAttrs.preInstall or ""; + }); }