* guix/build/emacs-utils.scm: Use (guix build utils) for invoke.
(emacs-batch-eval, emacs-batch-edit-file): Replace system* with invoke.
* guix/build/emacs-build-system.scm (make-autoloads): No need to return #t
explicitly since emacs-generate-autoloads now uses invoke.
Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
* guix/build/emacs-build-system.scm (set-emacs-load-path): Include Emacs Lisp
directories from all inputs. Also, add the unpacked source directory to
EMACSLOADPATH.
(emacs-inputs, emacs-inputs-directories, emacs-input->el-directory,
emacs-inputs-el-directories): Remove.
(%standard-phases): Move set-emacs-load-path phase to after unpack phase.
Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
This is a temporary workaround for <https://bugs.gnu.org/30116>, where
'substitute*' throws on files containing NUL characters.
* guix/build/emacs-build-system.scm (patch-el-files): Filter out elisp files
that contain NUL characters.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix/build/emacs-build-system.scm (%standard-phases): Reinstate the check
phase from the gnu-build-system.
* guix/build-system/emacs.scm (emacs-build)[tests?]: But do not enable it by default.
[parallel-tests?]: Add argument.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This generalizes the mechanism by which the Emacs dependencies are made visible,
so that any build phase can make use of them.
* guix/build/emacs-build-system.scm (%legacy-install-suffix): New variable.
(%install-suffix): Redefine in terms of %legacy-install-suffix.
(set-emacs-load-path): Add new phase used for dependency resolution.
(build): Remove ad-hoc dependency discovery mechanism.
(emacs-input->el-directory): Add new procedure.
(emacs-inputs-el-directories): Use it.
(package-name-version->elpa-name-version): Fix typo.
(%standard-phases): Include the new `set-emacs-load-path' phase. Refactor to
make the ordering of the phases clearer.
* guix/build/emacs-utils.scm (emacs-byte-compile-directory): Remove the
optional `dependency-dirs' argument, which is now obsoleted by the
`set-emacs-load-path' phase.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Previously the regex would match from /bin/ to a closing quote. However, this
is greedy, so will match up until the last ". This causes problems when there
are several quotes on the same line, for example:
org-effectiveness.el:
196: (call-process "/bin/bash" nil t nil "-c" strplot)
Therefore, change . to \S so that it doesn't include whitespace
characters. Changing to a lazy quantifier would be an option, if that were
supported.
* guix/build/emacs-build-system.scm (patch-el-files): Change the regular
expression used.
Previously the string-append here would error, which isn't useful as it
doesn't tell you which command couldn't be found. To make the error
actionable, catch it earlier, and explicitly error.
* guix/build/emacs-build-system.scm (patch-el-files): Handle (which cmd)
returning #f.
Detecting when no files were installed was broken when switching to use
cond. Test with (not (null? ...)) to fix this.
* guix/build/emacs-build-system.scm (install): Fix detecting when no files
were installed.
Modify the install phase to detect when nothing has been installed, and error
if this happens. This is preferable to continuing, and allowing the next phase
to fail.
Also, when nothing can be found to be installed, print out each file that was
considered, along with the regular expressions that were used to include and
exclude it.
* gnu/build/emacs-build-system.scm (install-file?): Add additional error
checking and logging.
The `install' phase of the emacs-build-system contained default arguments
duplicated from the host side `emacs-build' procedure. This change factorizes
them so that:
1. They are not duplicated.
2. They can be reused and extended easily when defining emacs packages.
* guix/build/emacs-build-system.scm (%default-include, %default-exclude): New
variables.
(install): Use %default-include and %default-exclude as default arguments.
* guix/build-system/emacs.scm: Use and re-export %default-include,
%default-exclude from (guix build emacs-build-system).
(emacs-build): Use %default-include and %default-exclude as default arguments.
Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
This prevents a ".el.el" extension for source files with no version number in
their file name.
* guix/build/emacs-build-system.scm (store-file->elisp-source-file): Remove
".el" extension from file name before splitting to name and version.
* guix/build/emacs-build-system.scm (emacs-inputs-el-directories):
Add ".../share/emacs/site-lisp" directory to the returned result as
elisp files can also be placed there.
* guix/build/emacs-build-system.scm (gnu:unpack)
(store-file->elisp-source-file, unpack): New procedures.
(%standard-phases): Use the new unpack procedure.
Fixes a regression introduced in b7c7c03eb5.
* guix/build/emacs-build-system.scm (package-name-version->elpa-name-version):
Remove unused 'name' binding. Do not abuse 'strip-store-file-name' to
remove the "emacs-" prefix, which worked before b7c7c03eb5 but not after.
* guix/build/utils.scm (strip-store-file-name): New procedure.
* guix/build/emacs-build-system.scm (store-directory->name-version):
Remove. Update callers to use 'strip-store-file-name'.
* gnu/packages/gcc.scm (make-libstdc++-doc)[arguments]: Use
'strip-store-file-name' instead of 'string-drop'.