emacs: do not do native compilation for .dir-locals.el
This file is not a valid Emacs lisp file. Some packages, such as auctex, el-get, helm and org, include this file without using no-byte-compile in file-local variables to skip native compilation, causing native compilation error like this: Wrong type argument: "/nix/store/<hash>-emacs-org-9.7.10/share/emacs/site-lisp/elpa/org-9.7.10/.dir-locals.el", proper-list-p, (#<symbol org-edit-src-content-indentation at 304> . 0) Some[1,2,3] of them decide to exclude this file. Org includes this file intendedly[4] but may add no-byte-compile to file-local variables. Hopefully, newer versions of them do not have this error. However, to support old versions of them and potentially other new packages with this problem, let's filter out this file in Nixpkgs. [1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73215 [2]: https://github.com/melpa/melpa/pull/9164 [3]: https://github.com/melpa/melpa/pull/9165 [4]: https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg00179.html
This commit is contained in:
@@ -86,7 +86,7 @@ libBuildHelper.extendMkDerivation' stdenv.mkDerivation (finalAttrs:
|
||||
source ${./emacs-funcs.sh}
|
||||
addEmacsVars "$out"
|
||||
|
||||
find $out/share/emacs -type f -name '*.el' -print0 \
|
||||
find $out/share/emacs -type f -name '*.el' -not -name ".dir-locals.el" -print0 \
|
||||
| xargs --verbose -0 -I {} -n 1 -P $NIX_BUILD_CORES sh -c \
|
||||
"emacs \
|
||||
--batch \
|
||||
|
||||
Reference in New Issue
Block a user