2020-11-01 05:26:58 +01:00
|
|
|
"""
|
|
|
|
Dependencies required to build Anki.
|
|
|
|
"""
|
|
|
|
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
|
2020-11-24 07:42:10 +01:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
2020-11-01 05:26:58 +01:00
|
|
|
|
2020-11-05 05:15:36 +01:00
|
|
|
def register_repos():
|
|
|
|
"Register required dependency repos."
|
2020-11-01 05:26:58 +01:00
|
|
|
|
|
|
|
# bazel
|
|
|
|
##########
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
http_archive,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "bazel_skylib",
|
|
|
|
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
|
|
|
|
urls = [
|
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
|
|
|
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# protobuf
|
|
|
|
############
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
http_archive,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "com_google_protobuf",
|
2020-12-15 07:12:09 +01:00
|
|
|
sha256 = "6dd0f6b20094910fbb7f1f7908688df01af2d4f6c5c21331b9f636048674aebf",
|
|
|
|
strip_prefix = "protobuf-3.14.0",
|
2020-11-01 05:26:58 +01:00
|
|
|
urls = [
|
2020-12-15 07:12:09 +01:00
|
|
|
"https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-all-3.14.0.tar.gz",
|
2020-11-01 05:26:58 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# rust
|
|
|
|
########
|
|
|
|
|
2020-12-03 00:28:14 +01:00
|
|
|
# native.local_repository(
|
|
|
|
# name = "io_bazel_rules_rust",
|
|
|
|
# path = "../rules_rust",
|
|
|
|
# )
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
git_repository,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "io_bazel_rules_rust",
|
2020-12-10 06:35:37 +01:00
|
|
|
commit = "dfd1200fcdcc0d56d725818ed3a66316517f20a6",
|
2020-11-01 05:26:58 +01:00
|
|
|
remote = "https://github.com/ankitects/rules_rust",
|
2020-12-10 06:35:37 +01:00
|
|
|
shallow_since = "1607578413 +1000",
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# python
|
|
|
|
##########
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
git_repository,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "rules_python",
|
2020-11-03 23:44:47 +01:00
|
|
|
commit = "3927c9bce90f629eb5ab08bbc99a3d3bda1d95c0",
|
|
|
|
remote = "https://github.com/ankitects/rules_python",
|
|
|
|
shallow_since = "1604408056 +1000",
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
2020-11-03 23:44:47 +01:00
|
|
|
# native.local_repository(
|
2020-11-01 05:26:58 +01:00
|
|
|
# name = "rules_python",
|
2020-11-03 23:44:47 +01:00
|
|
|
# path = "../rules_python",
|
2020-11-01 05:26:58 +01:00
|
|
|
# )
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
git_repository,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "com_github_ali5h_rules_pip",
|
2020-11-30 00:30:35 +01:00
|
|
|
commit = "73953e06fdacb565f224c66f0683a7d8d0ede223",
|
2020-11-01 05:26:58 +01:00
|
|
|
remote = "https://github.com/ankitects/rules_pip",
|
2020-11-30 00:30:35 +01:00
|
|
|
shallow_since = "1606453171 +1000",
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# native.local_repository(
|
|
|
|
# name = "com_github_ali5h_rules_pip",
|
|
|
|
# path = "../rules_pip",
|
|
|
|
# )
|
|
|
|
|
|
|
|
# javascript
|
|
|
|
##############
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
http_archive,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "build_bazel_rules_nodejs",
|
|
|
|
sha256 = "cd6c9880292fc83f1fd16ba33000974544b0fe0fccf3d5e15b2e3071ba011266",
|
|
|
|
urls = ["https://github.com/ankitects/rules_nodejs/releases/download/runfiles-fix-release/release.tar.gz"],
|
|
|
|
)
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
# maybe(
|
|
|
|
# http_archive,
|
2020-11-01 05:26:58 +01:00
|
|
|
# name = "build_bazel_rules_nodejs",
|
|
|
|
# # sha256 = "64a71a64ac58b8969bb19b1c9258a973b6433913e958964da698943fb5521d98",
|
|
|
|
# urls = [
|
|
|
|
# "file:///c:/anki/release.tar.gz",
|
|
|
|
# "file:///Users/dae/Work/code/dtop/release.tar.gz",
|
|
|
|
# ],
|
|
|
|
# )
|
|
|
|
|
|
|
|
# sass
|
|
|
|
############
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
http_archive,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "io_bazel_rules_sass",
|
|
|
|
sha256 = "6e60fc1cf0805af2cdcce727a5eed3f238fb4df41b35ce581c57996947c0202c",
|
|
|
|
strip_prefix = "rules_sass-1.26.12",
|
|
|
|
url = "https://github.com/bazelbuild/rules_sass/archive/1.26.12.zip",
|
|
|
|
)
|
|
|
|
|
|
|
|
# svelte
|
|
|
|
##########
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
git_repository,
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "build_bazel_rules_svelte",
|
|
|
|
commit = "c28cd9e5d251a0ce47c68a6a2a11b075f3df8899",
|
|
|
|
remote = "https://github.com/ankitects/rules_svelte",
|
|
|
|
shallow_since = "1603950453 +1000",
|
|
|
|
)
|
|
|
|
|
|
|
|
# native.local_repository(
|
|
|
|
# name = "build_bazel_rules_svelte",
|
|
|
|
# path = "../rules_svelte",
|
|
|
|
# )
|
|
|
|
|
|
|
|
# translations
|
|
|
|
################
|
|
|
|
|
2020-12-22 04:30:39 +01:00
|
|
|
core_i18n_commit = "b1c03cebb554e8568529e293756ac36cdf62341a"
|
|
|
|
core_i18n_shallow_since = "1608607833 +1000"
|
2020-11-01 05:26:58 +01:00
|
|
|
|
2020-12-22 04:30:39 +01:00
|
|
|
qtftl_i18n_commit = "e7dda1058c0510665f2ea8d8ffd74e506e578f7a"
|
|
|
|
qtftl_i18n_shallow_since = "1608607833 +1000"
|
2020-11-01 05:26:58 +01:00
|
|
|
|
2020-11-17 08:42:43 +01:00
|
|
|
i18n_build_content = """
|
2020-11-01 05:26:58 +01:00
|
|
|
filegroup(
|
|
|
|
name = "files",
|
|
|
|
srcs = glob(["**/*.ftl"]),
|
|
|
|
visibility = ["//visibility:public"],
|
2020-11-04 10:20:49 +01:00
|
|
|
)
|
|
|
|
exports_files(["l10n.toml"])
|
2020-11-17 08:42:43 +01:00
|
|
|
"""
|
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
new_git_repository,
|
2020-11-17 12:47:47 +01:00
|
|
|
name = "rslib_ftl",
|
|
|
|
build_file_content = i18n_build_content,
|
|
|
|
commit = core_i18n_commit,
|
|
|
|
shallow_since = core_i18n_shallow_since,
|
|
|
|
remote = "https://github.com/ankitects/anki-core-i18n",
|
|
|
|
)
|
2020-11-01 05:26:58 +01:00
|
|
|
|
2020-11-24 07:42:10 +01:00
|
|
|
maybe(
|
|
|
|
new_git_repository,
|
|
|
|
name = "extra_ftl",
|
|
|
|
build_file_content = i18n_build_content,
|
|
|
|
commit = qtftl_i18n_commit,
|
|
|
|
shallow_since = qtftl_i18n_shallow_since,
|
|
|
|
remote = "https://github.com/ankitects/anki-desktop-ftl",
|
|
|
|
)
|