Skip to content

Commit adbf67f

Browse files
committed
update platforms for pandoc
1 parent e272057 commit adbf67f

File tree

2 files changed

+57
-6
lines changed

2 files changed

+57
-6
lines changed

BUILD.bazel

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,44 @@ toolchain_type(
77
visibility = ["//visibility:public"],
88
)
99

10+
pandoc_toolchain(
11+
exec_compatible_with = [
12+
"@platforms//os:linux",
13+
"@platforms//cpu:arm64",
14+
],
15+
platform = "linux_arm_64",
16+
)
17+
1018
pandoc_toolchain(
1119
exec_compatible_with = [
1220
"@platforms//os:linux",
1321
"@platforms//cpu:x86_64",
1422
],
15-
platform = "linux",
23+
platform = "linux_x86_64",
24+
)
25+
26+
pandoc_toolchain(
27+
exec_compatible_with = [
28+
"@platforms//os:osx",
29+
"@platforms//cpu:arm64",
30+
],
31+
platform = "macOS_arm_64",
1632
)
1733

1834
pandoc_toolchain(
1935
exec_compatible_with = [
2036
"@platforms//os:osx",
2137
"@platforms//cpu:x86_64",
2238
],
23-
platform = "macOS",
39+
platform = "macOS_x86_64",
40+
)
41+
42+
pandoc_toolchain(
43+
exec_compatible_with = [
44+
"@platforms//os:windows",
45+
"@platforms//cpu:x86_64",
46+
],
47+
platform = "windows_x86_64",
2448
)
2549

2650
pandoc_binary(

repositories.bzl

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,44 @@ def gapic_generator_python():
3939

4040
_maybe(
4141
http_archive,
42-
name = "pandoc_linux",
42+
name = "pandoc_linux_arm_64",
43+
build_file_content = _PANDOC_BUILD_FILE,
44+
strip_prefix = "pandoc-3.7.0.2",
45+
url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-arm64.tar.gz",
46+
)
47+
48+
_maybe(
49+
http_archive,
50+
name = "pandoc_linux_x86_64",
4351
build_file_content = _PANDOC_BUILD_FILE,
4452
strip_prefix = "pandoc-3.7.0.2",
4553
url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz",
4654
)
4755

4856
_maybe(
4957
http_archive,
50-
name = "pandoc_macOS",
58+
name = "pandoc_macOS_arm_64",
5159
build_file_content = _PANDOC_BUILD_FILE,
5260
strip_prefix = "pandoc-3.7.0.2",
5361
url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-arm64-macOS.zip",
5462
)
5563

64+
_maybe(
65+
http_archive,
66+
name = "pandoc_macOS_x86_64",
67+
build_file_content = _PANDOC_BUILD_FILE,
68+
strip_prefix = "pandoc-3.7.0.2",
69+
url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-x86_64-macOS.zip",
70+
)
71+
72+
_maybe(
73+
http_archive,
74+
name = "pandoc_windows_x86_64",
75+
build_file_content = _PANDOC_BUILD_FILE,
76+
strip_prefix = "pandoc-3.7.0.2",
77+
url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-windows-x86_64.zip",
78+
)
79+
5680
_rules_gapic_version = "0.5.4"
5781
_maybe(
5882
http_archive,
@@ -70,8 +94,11 @@ def gapic_generator_python():
7094

7195
def gapic_generator_register_toolchains():
7296
native.register_toolchains(
73-
"@gapic_generator_python//:pandoc_toolchain_linux",
74-
"@gapic_generator_python//:pandoc_toolchain_macOS",
97+
"@gapic_generator_python//:pandoc_toolchain_linux_arm_64",
98+
"@gapic_generator_python//:pandoc_toolchain_linux_x86_64",
99+
"@gapic_generator_python//:pandoc_toolchain_macOS_arm_64",
100+
"@gapic_generator_python//:pandoc_toolchain_macOS_x86_64",
101+
"@gapic_generator_python//:pandoc_toolchain_windows_x86_64",
75102
)
76103

77104
def _maybe(repo_rule, name, strip_repo_prefix = "", **kwargs):

0 commit comments

Comments
 (0)