diff --git a/docs/ADD_PKG_MGR.md b/docs/ADD_PKG_MGR.md new file mode 100644 index 0000000..83083ff --- /dev/null +++ b/docs/ADD_PKG_MGR.md @@ -0,0 +1,22 @@ +# Adding support for a new package manager + +Bazel largely relies on existing package managers for each language ecosystem to fetch dependencies. +Thus the knowledge of provenance and package metadata needs to be plumbed through these tools. + +## + +In BUILD targets generated for third-party packages, implementations must create one of the following: + +```starlark +load("@rules_license//rules:license.bzl", "license") + +package( + default_package_metadata = [":license"], +) + +license( + name = "license", + src = ":LICENSE.txt", + license_kind = ["@rules_license//licenses/spdx:Apache-2.0"], +) +```