Install R dependencies and their system requirements for a package
install_pkg_sys_deps.RdClones the package source (or reuses clone_dir), then installs its dependency tree and the system
libraries those dependencies need via uvr (uvr sync --install-system-deps), so a dependency needing a system library no longer
fails the build. Transient failures are retried with exponential backoff.
Usage
install_pkg_sys_deps(
package_name,
tag,
local_clone_dir,
platform = NULL,
aggressive_cleanup = FALSE,
patches = NULL,
arch = NULL,
source_org_url = "https://github.com/cran",
clone_dir = NULL
)Arguments
- package_name
(character)
Package name- tag
(character)
Tag/version. Tags starting with "R-" are filtered out.- local_clone_dir
(character)
Path to clone git repos into- platform
(character)
Platform identifier- aggressive_cleanup
(logical)
Perform additional cache cleanup before installation- patches
Optional path to a patch registry directory containing a
registry.json(and any referenced diff files). When set, matching packages are pre-built as patched binaries and installed into the build library before dependency installation. Defaults toNULL(no patching).- arch
(character)
Architecture,"amd64"or"arm64".- source_org_url
(character)
Git organization URL in which to search for the package sources. The final URL will a combination from this argument and the package name. This also implies that the package source must exist in a repository with the same name. Must be a https:// URL, local paths are not supported.- clone_dir
(character)
Path to an existing clone of the package source. When given, itsDESCRIPTIONis used as-is and nothing is cloned, so dependencies resolve against the exact source being built. WhenNULL, the package is cloned fromsource_org_urlintolocal_clone_dirand removed afterwards.