| module( |
| name = "rules_img_tool", |
| version = "0.3.16", |
| ) |
| |
| bazel_dep(name = "rules_img", version = "0.3.16") |
| bazel_dep(name = "bazel_lib", version = "3.3.1") |
| bazel_dep(name = "bazel_skylib", version = "1.9.0") |
| bazel_dep(name = "gazelle", version = "0.51.3") |
| bazel_dep(name = "googleapis", version = "0.0.0-20260623-b6f9ff05") |
| bazel_dep(name = "platforms", version = "1.1.0") |
| bazel_dep(name = "protobuf", version = "35.1") |
| bazel_dep(name = "rules_go", version = "0.61.1") |
| |
| go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") |
| go_sdk.from_file( |
| go_mod = "//:go.mod", |
| ) |
| |
| # Known to exist since it is instantiated by rules_go itself. |
| # Used by the img_bootstrap repository rule to locate the host Go toolchain. |
| use_repo( |
| go_sdk, |
| "go_host_compatible_sdk_label", |
| ) |
| |
| go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") |
| go_deps.from_file(go_mod = "//:go.mod") |
| use_repo( |
| go_deps, |
| "com_github_aws_aws_sdk_go_v2", |
| "com_github_aws_aws_sdk_go_v2_config", |
| "com_github_aws_aws_sdk_go_v2_service_s3", |
| "com_github_awslabs_amazon_ecr_credential_helper_ecr_login", |
| "com_github_containerd_containerd_api", |
| "com_github_containerd_platforms", |
| "com_github_containerd_stargz_snapshotter_estargz", |
| "com_github_goccy_go_yaml", |
| "com_github_google_go_containerregistry", |
| "com_github_google_uuid", |
| "com_github_jedib0t_go_pretty_v6", |
| "com_github_klauspost_compress", |
| "com_github_klauspost_pgzip", |
| "com_github_opencontainers_go_digest", |
| "com_github_opencontainers_image_spec", |
| "com_github_vbatts_go_mtree", |
| "com_google_cloud_go_longrunning", |
| "org_golang_google_genproto_googleapis_api", |
| "org_golang_google_genproto_googleapis_bytestream", |
| "org_golang_google_genproto_googleapis_rpc", |
| "org_golang_google_grpc", |
| "org_golang_google_protobuf", |
| "org_golang_x_sync", |
| "org_golang_x_term", |
| ) |
| |
| # Bootstrap a host binary of the img tool from source. This is used by |
| # repository rules (image pulling) that need the tool at fetch time, before |
| # any build action can run. |
| img_bootstrap = use_repo_rule("//bootstrap:bootstrap.bzl", "img_bootstrap") |
| |
| img_bootstrap( |
| name = "img_bootstrap", |
| go_mod = "//:go.mod", |
| go_sum = "//:go.sum", |
| ) |
| |
| # inject the source built img tool into the prebuilt_img_tool module extension. |
| prebuilt_img_tool = use_extension("@rules_img//img/private/prebuilt:prebuilt.bzl", "prebuilt_img_tool") |
| prebuilt_img_tool.source_built(target = "@rules_img_tool//cmd/img") |
| |
| # inject the source-bootstrapped host binary for use in repository rules. |
| prebuilt_img_tool.host_tool(binary = "@img_bootstrap//:img.exe") |