1
1
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2
2
load ("@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" )
3
3
4
- def prometheus_cpp_repositories ():
4
+ def _legacy_and_bzlmod_repositories ():
5
5
maybe (
6
6
http_archive ,
7
7
name = "civetweb" ,
@@ -13,16 +13,6 @@ def prometheus_cpp_repositories():
13
13
build_file = "@com_github_jupp0r_prometheus_cpp//bazel:civetweb.BUILD" ,
14
14
)
15
15
16
- maybe (
17
- http_archive ,
18
- name = "com_google_googletest" ,
19
- sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2" ,
20
- strip_prefix = "googletest-release-1.12.1" ,
21
- urls = [
22
- "https://github.com/google/googletest/archive/release-1.12.1.tar.gz" ,
23
- ],
24
- )
25
-
26
16
maybe (
27
17
http_archive ,
28
18
name = "com_github_curl" ,
@@ -35,27 +25,28 @@ def prometheus_cpp_repositories():
35
25
build_file = "@com_github_jupp0r_prometheus_cpp//bazel:curl.BUILD" ,
36
26
)
37
27
28
+ def prometheus_cpp_repositories ():
29
+ _legacy_and_bzlmod_repositories ()
30
+
31
+ # These legacy style repos have bzlmod support, they are re-added here for legacy support
38
32
maybe (
39
33
http_archive ,
40
- name = "com_github_google_benchmark " ,
41
- sha256 = "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce " ,
42
- strip_prefix = "benchmark-1.8.3 " ,
34
+ name = "com_google_googletest " ,
35
+ sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2 " ,
36
+ strip_prefix = "googletest-release-1.12.1 " ,
43
37
urls = [
44
- "https://github.com/google/benchmark /archive/v1.8.3 .tar.gz" ,
38
+ "https://github.com/google/googletest /archive/release-1.12.1 .tar.gz" ,
45
39
],
46
40
)
47
41
48
42
maybe (
49
43
http_archive ,
50
- name = "zlib " ,
51
- sha256 = "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30 " ,
52
- strip_prefix = "zlib -1.2.13 " ,
44
+ name = "com_github_google_benchmark " ,
45
+ sha256 = "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce " ,
46
+ strip_prefix = "benchmark -1.8.3 " ,
53
47
urls = [
54
- "https://mirror.bazel.build/zlib.net/zlib-1.2.13.tar.gz" ,
55
- "https://zlib.net/zlib-1.2.13.tar.gz" ,
56
- "https://storage.googleapis.com/bazel-mirror/zlib.net/zlib-1.2.13.tar.gz" ,
48
+ "https://github.com/google/benchmark/archive/v1.8.3.tar.gz" ,
57
49
],
58
- build_file = "@com_github_jupp0r_prometheus_cpp//bazel:zlib.BUILD" ,
59
50
)
60
51
61
52
maybe (
@@ -71,8 +62,21 @@ def prometheus_cpp_repositories():
71
62
],
72
63
)
73
64
65
+ maybe (
66
+ http_archive ,
67
+ name = "zlib" ,
68
+ sha256 = "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30" ,
69
+ strip_prefix = "zlib-1.2.13" ,
70
+ urls = [
71
+ "https://mirror.bazel.build/zlib.net/zlib-1.2.13.tar.gz" ,
72
+ "https://zlib.net/zlib-1.2.13.tar.gz" ,
73
+ "https://storage.googleapis.com/bazel-mirror/zlib.net/zlib-1.2.13.tar.gz" ,
74
+ ],
75
+ build_file = "@com_github_jupp0r_prometheus_cpp//bazel:zlib.BUILD" ,
76
+ )
77
+
74
78
def _data_deps_extension_impl (ctx ):
75
- prometheus_cpp_repositories ()
79
+ _legacy_and_bzlmod_repositories ()
76
80
77
81
data_deps_ext = module_extension (
78
82
implementation = _data_deps_extension_impl ,
0 commit comments