Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ADD_PKG_MGR.md #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/ADD_PKG_MGR.md
Original file line number Diff line number Diff line change
@@ -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"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If people are doing the integration, we should take the same opportunity to add package_info rules to pull package names and versions into the BUILD file in a uniform way.

)

license(
name = "license",
src = ":LICENSE.txt",
license_kind = ["@rules_license//licenses/spdx:Apache-2.0"],
)
```