download
This field specifies a git repository to download the module’s source files from.
Modules with download automatically have is_build_dep
set to true, and their srcdir points to the download
directory.
The context must define GIT_DOWNLOAD and (if using patches) GIT_PATCH rules.
fields
git: Required. A map withurland one ofcommit,branch, ortag.patches: Optional. A list of patch files to apply after download.dldir: Optional. A string overriding the download directory. Defaults tobuild/dl/<relpath>/<module_name>.
Example:
modules:
- name: external_lib
download:
git:
url: https://github.com/example/lib.git
commit: abc123
sources:
- lib.c
- name: patched_lib
download:
git:
url: https://github.com/example/lib.git
commit: main
patches:
- 0001-fix-build.patch
sources:
- lib.c