163 lines
5.5 KiB
Python
163 lines
5.5 KiB
Python
workspace(name = "parselink")
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
|
|
|
#===============================================================================
|
|
# Imported Bazel modules
|
|
#===============================================================================
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# Boost libraries, needed for asio + beast
|
|
#-------------------------------------------------------------------------------
|
|
rules_boost_commit = "49dc7d0e697c784f207fb1773b5b371c2511bfb8"
|
|
rules_boost_url = "https://github.com/nelhage/rules_boost/archive/"
|
|
|
|
http_archive(
|
|
name = "com_github_nelhage_rules_boost",
|
|
url = rules_boost_url + rules_boost_commit + ".zip",
|
|
strip_prefix = "rules_boost-" + rules_boost_commit
|
|
)
|
|
|
|
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
|
|
boost_deps()
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# magic_enum: Used in logging implementation for enum names.
|
|
#-------------------------------------------------------------------------------
|
|
magic_enum_version = "0.9.5"
|
|
magic_enum_base_url = \
|
|
"https://github.com/Neargye/magic_enum/archive/refs/tags/v"
|
|
magic_enum_sha256 = \
|
|
"a10fa650307c60950b712a65a33fb46e9ac96ea72585cfa9fcf9ac9f502c01eb"
|
|
|
|
http_archive(
|
|
name = "magic_enum",
|
|
# sha256 = magic_enum_sha256,
|
|
url = magic_enum_base_url + magic_enum_version + ".zip",
|
|
strip_prefix = "magic_enum-" + magic_enum_version,
|
|
)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# fmt: Used in logging implementation.
|
|
#-------------------------------------------------------------------------------
|
|
fmt_version = "10.1.1"
|
|
fmt_base_url = "https://github.com/fmtlib/fmt/archive/refs/tags/"
|
|
|
|
http_archive(
|
|
name = "fmt",
|
|
url = fmt_base_url + fmt_version + ".zip",
|
|
patch_cmds = [
|
|
"mv support/bazel/.bazelversion .bazelbersion",
|
|
"mv support/bazel/BUILD.bazel BUILD.bazel",
|
|
"mv support/bazel/WORKSPACE.bazel WORKSPACE.bazel",
|
|
],
|
|
strip_prefix = "fmt-" + fmt_version,
|
|
)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# tl/expected: An implementation of std::expected with monadic extensions.
|
|
#-------------------------------------------------------------------------------
|
|
tl_expected_version = "1.1.0"
|
|
tl_expected_base_url = \
|
|
"https://github.com/TartanLlama/expected/archive/refs/tags/v"
|
|
|
|
http_archive(
|
|
name = "expected",
|
|
url = tl_expected_base_url + tl_expected_version + ".zip",
|
|
strip_prefix = "expected-" + tl_expected_version,
|
|
build_file_content =
|
|
"""
|
|
cc_library(
|
|
name = "expected",
|
|
includes = ["include"],
|
|
hdrs = ["include/tl/expected.hpp"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
"""
|
|
)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# libhydrogen: A lightweight cryptography library
|
|
#-------------------------------------------------------------------------------
|
|
hydrogen_commit = "c382cbb"
|
|
hydrogen_base_url = \
|
|
"https://github.com/jedisct1/libhydrogen"
|
|
hydrogen_branch = "master"
|
|
|
|
git_repository(
|
|
name = "hydrogen",
|
|
remote = hydrogen_base_url,
|
|
commit = hydrogen_commit,
|
|
build_file_content =
|
|
"""
|
|
cc_library(
|
|
name = "hydrogen",
|
|
srcs = glob(["hydrogen.c", "impl/**/*.h"]),
|
|
hdrs = ["hydrogen.h"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# ut: Testing framework.
|
|
# TODO(kss): Only if tests are needed?
|
|
#-------------------------------------------------------------------------------
|
|
ut_version = "1.1.9"
|
|
ut_base_url = "https://github.com/boost-ext/ut/archive/refs/tags/v"
|
|
ut_sha256 = "5811d993f88c5ba4916784cef60d1cb529917fb9a3f72236219cb9ee9c1974ca"
|
|
|
|
http_archive(
|
|
name = "ut",
|
|
url = ut_base_url + ut_version + ".zip",
|
|
sha256 = ut_sha256,
|
|
build_file_content =
|
|
"""
|
|
cc_library(
|
|
name = "ut",
|
|
includes = ["include"],
|
|
hdrs = glob(["include/**/*.hpp"]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
strip_prefix = "ut-" + ut_version,
|
|
)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# rapidcheck: Property-based-testing framework.
|
|
# TODO(kss): Only if tests are needed?
|
|
#-------------------------------------------------------------------------------
|
|
rapidcheck_commit = "ff6af6fc683159deb51c543b065eba14dfcf329b"
|
|
rapidcheck_base_url = "https://github.com/emil-e/rapidcheck"
|
|
rapidcheck_branch = "master"
|
|
|
|
git_repository(
|
|
name = "rapidcheck",
|
|
remote = rapidcheck_base_url,
|
|
commit = rapidcheck_commit,
|
|
build_file = "@//:BUILD.rapidcheck"
|
|
)
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# Support compile_commands.json generation for LSP.
|
|
#-------------------------------------------------------------------------------
|
|
hedron_commit = "3dddf205a1f5cde20faf2444c1757abe0564ff4c"
|
|
hedron_sha256 = \
|
|
"a4ce320769ba39a292ae0319eb534599d5114751ec9873e7eaa2aa5b7b7af1b2"
|
|
hedron_base_url = \
|
|
"https://github.com/hedronvision/bazel-compile-commands-extractor/archive/"
|
|
|
|
http_archive(
|
|
name = "hedron_compile_commands",
|
|
sha256 = hedron_sha256,
|
|
strip_prefix = "bazel-compile-commands-extractor-" + hedron_commit,
|
|
url = hedron_base_url + hedron_commit + ".zip",
|
|
)
|
|
|
|
load("@hedron_compile_commands//:workspace_setup.bzl",
|
|
"hedron_compile_commands_setup",
|
|
)
|
|
hedron_compile_commands_setup()
|