-
Notifications
You must be signed in to change notification settings - Fork 47
/
WORKSPACE
73 lines (50 loc) · 2.23 KB
/
WORKSPACE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
workspace(name = "com_github_mvukov_rules_ros2_examples")
# This import is relevant for these examples and this (rules_ros2) repository.
local_repository(
name = "com_github_mvukov_rules_ros2",
path = "..",
)
# In a normal workflow, you would typically import rules_ros2 into your
# (mono)repo as follows:
# http_archive(
# name = "com_github_mvukov_rules_ros2",
# # Here you can use e.g. sha256sum cli utility to compute the sha sum.
# sha256 = "<sha sum of the .tar.gz archive below>",
# strip_prefix = "rules_ros2-<git commit SHA>",
# url = "https://github.com/mvukov/rules_ros2/archive/<git commit SHA>.tar.gz",
# )
load("@com_github_mvukov_rules_ros2//repositories:repositories.bzl", "ros2_repositories", "ros2_workspace_repositories")
ros2_workspace_repositories()
ros2_repositories()
load("@com_github_mvukov_rules_ros2//repositories:deps.bzl", "ros2_deps")
ros2_deps()
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
py_repositories()
python_register_toolchains(
name = "rules_ros2_python",
python_version = "3.10",
)
load("@rules_python//python:pip.bzl", "pip_parse")
load("@rules_ros2_python//:defs.bzl", python_interpreter_target = "interpreter")
pip_parse(
name = "rules_ros2_pip_deps",
python_interpreter_target = python_interpreter_target,
requirements_lock = "@com_github_mvukov_rules_ros2//:requirements_lock.txt",
)
load(
"@rules_ros2_pip_deps//:requirements.bzl",
install_rules_ros2_pip_deps = "install_deps",
)
install_rules_ros2_pip_deps()
# Below is an optional setup for Rust support for ROS 2.
load("@com_github_mvukov_rules_ros2//repositories:rust_setup_stage_1.bzl", "rust_setup_stage_1")
rust_setup_stage_1()
load("@com_github_mvukov_rules_ros2//repositories:rust_setup_stage_2.bzl", "rust_setup_stage_2")
rust_setup_stage_2()
load("@com_github_mvukov_rules_ros2//repositories:rust_setup_stage_3.bzl", "rust_setup_stage_3")
rust_setup_stage_3(
# Only needed for CI here, see https://github.com/bazelbuild/rules_rust/pull/2698.
generator = "@com_github_mvukov_rules_ros2_cargo_bazel//:cargo-bazel",
)
load("@com_github_mvukov_rules_ros2//repositories:rust_setup_stage_4.bzl", "rust_setup_stage_4")
rust_setup_stage_4()