1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-13 18:40:57 +02:00

gnu: emacs: Check integrity of native-compiled files.

In the previous commit, we've added a patch that potentially messes with
how built-in (especially preloaded) Lisp libraries are loaded.  Thus, we
might want to assert that these files still load fine, as reported when
querying the builtin documentation of functions provided by them.

* gnu/packages/aux-files/emacs/comp-integrity.el: New file.
* gnu/Makefile.am (dist_noinst_DATA): Register it here.
* gnu/packages/emacs.scm (emacs-no-x)[#:phases]: Add ‘validate-comp-integrity’.
This commit is contained in:
Liliana Marie Prikler 2024-02-24 07:18:52 +01:00
parent e2b04973fd
commit 35fc3027f3
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87
3 changed files with 139 additions and 1 deletions

View file

@ -380,7 +380,18 @@ editor (console only)")
"-B" #$(this-package-input "libgccjit") "/lib/gcc/"))))))
(add-after 'build 'build-trampolines
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "trampolines" make-flags)))))))
(apply invoke "make" "trampolines" make-flags)))
(add-after 'validate-runpath 'validate-comp-integrity
(lambda* (#:key outputs #:allow-other-keys)
(if #$(%current-target-system)
(display "Cannot validate native-comp on cross builds.\n")
(invoke
(string-append (assoc-ref outputs "out") "/bin/emacs")
"--batch"
"--load"
#$(local-file
(search-auxiliary-file "emacs/comp-integrity.el"))
"-f" "ert-run-tests-batch-and-exit"))))))))
(inputs
(modify-inputs (package-inputs emacs-minimal)
(prepend gnutls