-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMODULE.bazel
94 lines (85 loc) · 3.28 KB
/
MODULE.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
"Contains code related to the Cortecs programming language"
module(name = "cortecs", version = "2024.11.15")
git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
bazel_dep(name = "rules_cc", version = "0.0.17")
# git_repository dependencies are auto updated by a github action that
# * scans for lines that start with git_repository(
# * inside it looks for:
# * name
# * remote
# * branch
# * this conflicts with commit in git_repository
# * this line should be commented out
# * commit
# * due to a bit of laziness this must come last
# * checks the remote for the commit at the tip of the branch
# * if they're different, it submits a new PR for each individual dependency that needs updating
# Make sure the 4 attributes are at the top of the declaration/ahead of build_file_content.
# due to a bit of laziness in the script, the error checking only looks for build_file_content or )
# to determine end of declaration.
# git_override dependencies are auto updated by renovate
# due to laziness on the renovate side, bazel_dep must have a version
# it doesn't need to be any particular version,
# so we use "0.0.0" to indicate the version is overridden by git commit
bazel_dep(name = "flecs", version = "0.0.0")
git_override(
module_name = "flecs",
remote = "https://github.com/SanderMertens/flecs.git",
commit = "d4462b4cd0446d478b450276ba770cbae937fbb1",
)
git_repository(
name = "unity",
remote = "https://github.com/ThrowTheSwitch/Unity.git",
# branch = "master",
commit = "cbcd08fa7de711053a3deec6339ee89cad5d2697",
build_file_content = """
cc_library(
name = "unity",
srcs = glob(["src/*.c"]),
hdrs = glob(["src/*.h"]),
features = ["treat_warnings_as_errors"],
includes = ["src/"],
visibility = ["//visibility:public"],
)
""",
)
git_repository(
name = "cJSON",
remote = "https://github.com/DaveGamble/cJSON.git",
# branch = "master",
commit = "12c4bf1986c288950a3d06da757109a6aa1ece38",
build_file_content = """
cc_library(
name = "cJSON",
srcs = ["cJSON.c"],
hdrs = ["cJSON.h"],
features = ["treat_warnings_as_errors"],
includes = ["."],
visibility = ["//visibility:public"],
)
""",
)
# Usage:
# bazel build //...
# bazel run @hedron_compile_commands//:refresh_all
# Sometimes helpful to clear the bazel cache:
# bazel clean
# rm -r $(bazel info repository_cache)
# To have renovate update this dependency, this must have a version even though
# it's not declared in the hedron_compile_commands MODULE.bazel
bazel_dep(name = "hedron_compile_commands", version = "0.0.0", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
commit = "4f28899228fb3ad0126897876f147ca15026151e",
)
http_archive(
name = "icu",
# BUILD files inside icu4c reference //icu4c/ but it unzips into icu/
# Configure to replace the folder icu/ with icu4c/
strip_prefix = "icu",
add_prefix = "icu4c",
integrity = "sha256-kw832xpCPD25SC/ceTIkfpp//WMwiVv/QZd/4q+Piho=",
urls = ["https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-src.zip"],
)