-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE.bazel
71 lines (59 loc) · 2.28 KB
/
WORKSPACE.bazel
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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
### Python and poetry rules
http_archive(
name = "rules_python",
sha256 = "a644da969b6824cc87f8fe7b18101a8a6c57da5db39caa6566ec6109f37d2141",
strip_prefix = "rules_python-0.20.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.20.0/rules_python-0.20.0.tar.gz",
)
http_archive(
name = "rules_python_poetry",
sha256 = "d6d1d09ffcfcec5eccd4c91d6cb85bfc3c2014f97ad9dc51843c0fe70575bcf8",
strip_prefix = "rules_python_poetry-1fc695ec467e01e1be11e8feb1b6b7fda614ecb7",
urls = ["https://github.com/AndrewGuenther/rules_python_poetry/archive/1fc695ec467e01e1be11e8feb1b6b7fda614ecb7.tar.gz"],
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies")
pip_install_dependencies()
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
python_register_toolchains(
name = "python311",
python_version = "3.11",
)
load("@rules_python_poetry//rules_python_poetry:poetry.bzl", "poetry_lock")
poetry_lock(
name = "requirements",
lockfile = "//backend:poetry.lock",
)
load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
name = "backend_deps",
requirements_lock = "@requirements//:requirements_lock.txt",
)
load("@backend_deps//:requirements.bzl", "install_deps")
install_deps()
### Rust and cargo rules
http_archive(
name = "rules_rust",
sha256 = "950a3ad4166ae60c8ccd628d1a8e64396106e7f98361ebe91b0bcfe60d8e4b60",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.20.0/rules_rust-v0.20.0.tar.gz"],
)
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
rules_rust_dependencies()
rust_register_toolchains(
edition = "2023",
versions = [
"1.68.2"
],
)
load("@rules_rust//crate_universe:defs.bzl", "crates_repository")
crates_repository(
name = "crate_index",
lockfile = "//cli:cargo-bazel-lock.json",
cargo_lockfile = "//cli:Cargo.lock",
manifests = ["//cli:Cargo.toml"],
)
load("@crate_index//:defs.bzl", "crate_repositories")
crate_repositories()