package_add()
def package_add(domain, owner, repo, version, visibility, add_prefix, globs) -> stringAdd a package to the workspace.
The package defintion must exist in the packages repository (the same
repository as this file).
The folders are organized as domain/owner/repo/version.
Example:
load("//@star/packages/star/package.star", "package_add")
package_add("github.com", "ninja", "ninja-build", "v1.12.1")
package_add("github.com", "jqlang", "jq", "jq-1.7.1")Args
domain: string: The domain of the package.owner: string: The owner of the package.repo: string: The repository of the package.version: string: The version of the package.visibility: Rule visibility. See visibility.star for more info.add_prefix: Changes the default prefix to the specified valueglobs: Specify values to hardlink to the workspace
Returns
The name of the rule used to checkout the package.
package_is_platform_supported()
def package_is_platform_supported(domain, owner, repo, version, platform) -> boolChecks if a package is supported on a given platform.
Args
domain: string: The domain of the package.owner: string: The owner of the package.repo: string: The repository of the package.version: string: The version of the package.platform: The platform to check for support (Default is current platform).
Returns
True if the package is supported on the given platform, False otherwise.