emacs: make sure native compilation output dir is in $out (#342212)

This commit is contained in:
Lin Jian 2024-09-17 09:59:51 +08:00 committed by GitHub
commit b20bede431
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -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 {} \

View File

@ -25,4 +25,14 @@ rec {
broken = true;
};
});
mkHome =
pkg:
pkg.overrideAttrs (previousAttrs: {
preInstall =
''
HOME=$(mktemp -d)
''
+ previousAttrs.preInstall or "";
});
}