mirror of
https://github.com/vale981/melpazoid
synced 2025-03-05 09:21:39 -05:00
add instruction to compile the vterm module and add dependencies
This commit is contained in:
parent
e8f01d926d
commit
0ac651621f
4 changed files with 14 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
||||||
_requirements.el
|
_requirements.el
|
||||||
_reminders.json
|
_reminders.json
|
||||||
|
_native_deps
|
||||||
pkg
|
pkg
|
||||||
*.elc
|
*.elc
|
||||||
|
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -17,8 +17,8 @@ term: image
|
||||||
$(DOCKER) run -it --rm --entrypoint=/bin/bash ${DOCKER_OPTIONS} ${IMAGE_NAME}
|
$(DOCKER) run -it --rm --entrypoint=/bin/bash ${DOCKER_OPTIONS} ${IMAGE_NAME}
|
||||||
|
|
||||||
.PHONY: image
|
.PHONY: image
|
||||||
image:
|
image: _requirements.el _native_deps
|
||||||
@$(DOCKER) build --build-arg PACKAGE_MAIN ${DOCKER_OUTPUT} \
|
@$(DOCKER) build --build-arg NATIVE_DEPS="$$(cat _native_deps)" --build-arg PACKAGE_MAIN ${DOCKER_OUTPUT} \
|
||||||
--tag ${IMAGE_NAME} -f docker/Dockerfile .
|
--tag ${IMAGE_NAME} -f docker/Dockerfile .
|
||||||
|
|
||||||
.PHONY: test-melpazoid
|
.PHONY: test-melpazoid
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
# <https://ubuntuhandbook.org/index.php/2023/08/gnu-emacs-29-1-ubuntu-ppa/>
|
# <https://ubuntuhandbook.org/index.php/2023/08/gnu-emacs-29-1-ubuntu-ppa/>
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
ARG NATIVE_DEPS=""
|
||||||
|
ENV NATIVE_DEPS="${NATIVE_DEPS}"
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get -y install curl gnupg openssh-client wget \
|
&& apt-get -y install curl gnupg openssh-client wget ${NATIVE_DEPS} \
|
||||||
&& apt-get -y --no-install-recommends install software-properties-common \
|
&& apt-get -y --no-install-recommends install software-properties-common \
|
||||||
&& add-apt-repository ppa:ubuntuhandbook1/emacs \
|
&& add-apt-repository ppa:ubuntuhandbook1/emacs \
|
||||||
&& apt-get -y install emacs emacs-common \
|
&& apt-get -y install emacs emacs-common \
|
||||||
|
|
|
@ -238,7 +238,8 @@ def _main_file(files: list[Path], recipe: str) -> Path | None:
|
||||||
|
|
||||||
def _write_requirements(files: list[Path]) -> None:
|
def _write_requirements(files: list[Path]) -> None:
|
||||||
"""Create a little elisp script that Docker will run as setup."""
|
"""Create a little elisp script that Docker will run as setup."""
|
||||||
with Path('_requirements.el').open('w', encoding='utf-8') as requirements_el:
|
with (Path('_requirements.el').open('w', encoding='utf-8') as requirements_el,
|
||||||
|
Path('_native_deps').open('w', encoding='utf-8') as native_deps):
|
||||||
requirements_el.write(
|
requirements_el.write(
|
||||||
f";; {time.strftime('%Y-%m-%d')} ; helps to invalidate old Docker cache\n\n"
|
f";; {time.strftime('%Y-%m-%d')} ; helps to invalidate old Docker cache\n\n"
|
||||||
+ ";; NOTE: emacs --script <file.el> will set `load-file-name' to <file.el>\n"
|
+ ";; NOTE: emacs --script <file.el> will set `load-file-name' to <file.el>\n"
|
||||||
|
@ -265,12 +266,18 @@ def _write_requirements(files: list[Path]) -> None:
|
||||||
_fail(
|
_fail(
|
||||||
"- Don't require marginalia: https://github.com/minad/marginalia#adding-custom-annotators-or-classifiers"
|
"- Don't require marginalia: https://github.com/minad/marginalia#adding-custom-annotators-or-classifiers"
|
||||||
)
|
)
|
||||||
|
|
||||||
# always install the latest available version of the dependency.
|
# always install the latest available version of the dependency.
|
||||||
requirements_el.write(
|
requirements_el.write(
|
||||||
f'\n(message "Installing {req_} {version} or later")\n'
|
f'\n(message "Installing {req_} {version} or later")\n'
|
||||||
+ f"(ignore-errors (package-install (cadr (assq '{req_} package-archive-contents))))\n"
|
+ f"(ignore-errors (package-install (cadr (assq '{req_} package-archive-contents))))\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if req == 'vterm':
|
||||||
|
native_deps.write("cmake libvterm-dev ")
|
||||||
|
requirements_el.write('(setq vterm-always-compile-module t)\n')
|
||||||
|
requirements_el.write('(vterm-module-compile)\n')
|
||||||
|
|
||||||
|
|
||||||
def requirements(files: list[Path]) -> set[str]:
|
def requirements(files: list[Path]) -> set[str]:
|
||||||
"""Return (downcased) requirements given a listing of files.
|
"""Return (downcased) requirements given a listing of files.
|
||||||
|
|
Loading…
Add table
Reference in a new issue