|
1 | | -load("@bazel_features//:features.bzl", "bazel_features") |
2 | 1 | load("@rules_rust//rust/platform:triple.bzl", "triple") |
3 | 2 | load("@rules_rust//rust/private:repository_utils.bzl", "BUILD_for_clippy") |
4 | | -load(":rust_repository_utils.bzl", "download_and_extract", "RUST_REPOSITORY_COMMON_ATTR") |
| 3 | +load(":rust_repository_utils.bzl", "RUST_REPOSITORY_COMMON_ATTR", "download_and_extract") |
| 4 | +load(":symlink_utils.bzl", "relative_symlink") |
5 | 5 |
|
6 | 6 | def _clippy_repository_impl(rctx): |
7 | 7 | exec_triple = triple(rctx.attr.triple) |
8 | 8 | download_and_extract(rctx, "clippy", "clippy-preview", exec_triple) |
9 | 9 | rctx.file("BUILD.bazel", BUILD_for_clippy(exec_triple)) |
10 | 10 |
|
11 | 11 | rustc_repo_root = rctx.path(rctx.attr.rustc_repo_build_file).dirname |
12 | | - rctx.symlink(rustc_repo_root.get_child("lib"), "lib") |
| 12 | + relative_symlink(rctx, rustc_repo_root.get_child("lib"), "lib") |
13 | 13 |
|
14 | | - return rctx.repo_metadata( |
15 | | - reproducible = bazel_features.external_deps.repo_rules_relativize_symlinks, |
16 | | - ) |
| 14 | + return rctx.repo_metadata(reproducible = True) |
17 | 15 |
|
18 | 16 | clippy_repository = repository_rule( |
19 | 17 | implementation = _clippy_repository_impl, |
|
0 commit comments