rules_rust
rules_rust copied to clipboard
Provide rules_license metadata in crate BUILD files
Please provide an option to include rules_license metadata when rendering crate BUILD files.
For example the BUILD file for the rand crate would include
...
load("@rules_license//rules:package_info.bzl", "package_info")
load("@rules_license//rules:license.bzl", "license")
package(
default_package_metadata = [
":license",
":package_info",
],
default_visibility = ["//visibility:public"],
)
package_info(
name = "package_info",
package_name = "rand",
package_version = "0.8.5",
package_url = "https://github.com/rust-random/rand",
)
license(
name = "license",
license_kinds = [
"@rules_license//licenses/spdx:Apache-2.0",
"@rules_license//licenses/spdx:MIT",
],
)
...
rules_license also gives the option to set copyright_notice and license_text. Should there be an option to try and get this automatically as well? Or is this too complicated and should be done if needed via the package_url field by users?