package_info

Rules

package_info

load("@rules_cc_autoconf//autoconf:package_info.bzl", "package_info")

package_info(name, aliases, module_bazel, package_bugreport, package_name, package_tarname,
             package_url, package_version, strip_bcr_version)

A rule for parsing module info from MODULE.bazel files.

This rule is most useful when paired with the autoconf rule.

Example:

load("@rules_cc_autoconf//autoconf:autoconf.bzl", "autoconf")
load("@rules_cc_autoconf//autoconf:package_info.bzl", "package_info")

package_info(
    name = "package_info",
    module_bazel = "//:MODULE.bazel",
)

autoconf(
    name = "config_h",
    out = "config.h",
    checks = [
        # ...
    ],
    deps = [
        ":package_info",
    ],
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
aliasesAdditional variables to define that are mirrored by the provided value variable.Dictionary: String -> Stringoptional{}
module_bazelA MODULE.bazel file to parse module information from. Mutually exclusive with package_name and package_version.LabeloptionalNone
package_bugreportThe package bug report email/URL. Used to populate PACKAGE_BUGREPORT define.Stringoptional""
package_nameThe package name. Must be provided together with package_version if module_bazel is not provided.Stringoptional""
package_tarnameExactly tarname, possibly generated from package.Stringoptional""
package_urlThe package home page URL. Used to populate PACKAGE_URL define.Stringoptional""
package_versionThe package version. Must be provided together with package_name if module_bazel is not provided.Stringoptional""
strip_bcr_versionWhether or not to strip .bcr.* suffixes from module_bazel parsed versions.BooleanoptionalFalse