File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,24 @@ def _uv_repo_impl(repository_ctx):
5757 ),
5858 )
5959
60- return {
60+ attrs = {
6161 "name" : repository_ctx .attr .name ,
6262 "platform" : repository_ctx .attr .platform ,
6363 "sha256" : result .sha256 ,
6464 "urls" : repository_ctx .attr .urls ,
6565 "version" : repository_ctx .attr .version ,
6666 }
6767
68+ # Bazel <8.3.0 lacks repository_ctx.repo_metadata
69+ if not hasattr (repository_ctx , "repo_metadata" ):
70+ return attrs
71+
72+ reproducible = repository_ctx .attr .sha256 != ""
73+ return repository_ctx .repo_metadata (
74+ reproducible = reproducible ,
75+ attrs_for_reproducibility = {} if reproducible else attrs ,
76+ )
77+
6878uv_repository = repository_rule (
6979 _uv_repo_impl ,
7080 doc = "Fetch external tools needed for uv toolchain" ,
You can’t perform that action at this time.
0 commit comments