245 lines
5.8 KiB
Python
245 lines
5.8 KiB
Python
module(
|
|
name = "databuild",
|
|
version = "0.1",
|
|
)
|
|
|
|
bazel_dep(name = "bazel_skylib", version = "1.8.1")
|
|
bazel_dep(name = "platforms", version = "0.0.11")
|
|
bazel_dep(name = "rules_shell", version = "0.4.0")
|
|
bazel_dep(name = "rules_oci", version = "2.2.6")
|
|
bazel_dep(name = "aspect_bazel_lib", version = "2.14.0")
|
|
bazel_dep(name = "rules_rust", version = "0.61.0")
|
|
bazel_dep(name = "rules_proto", version = "7.0.2")
|
|
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
|
|
|
|
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
|
|
crate.spec(
|
|
features = ["derive"],
|
|
package = "serde",
|
|
version = "1.0",
|
|
)
|
|
crate.spec(
|
|
package = "serde_json",
|
|
version = "1.0",
|
|
)
|
|
crate.spec(
|
|
package = "log",
|
|
version = "0.4",
|
|
)
|
|
crate.spec(
|
|
features = ["stderr"],
|
|
package = "simple_logger",
|
|
version = "4.3",
|
|
)
|
|
crate.spec(
|
|
package = "crossbeam-channel",
|
|
version = "0.5",
|
|
)
|
|
crate.spec(
|
|
package = "num_cpus",
|
|
version = "1.16",
|
|
)
|
|
crate.spec(
|
|
default_features = False,
|
|
features = [
|
|
"macros",
|
|
"net",
|
|
"rt-multi-thread",
|
|
"sync",
|
|
],
|
|
package = "tokio",
|
|
version = "1.38",
|
|
)
|
|
crate.spec(
|
|
package = "prost",
|
|
version = "0.13",
|
|
)
|
|
crate.spec(
|
|
package = "prost-types",
|
|
version = "0.13",
|
|
)
|
|
crate.spec(
|
|
package = "prost-build",
|
|
version = "0.13",
|
|
)
|
|
crate.spec(
|
|
package = "tempfile",
|
|
version = "3.0",
|
|
)
|
|
crate.spec(
|
|
package = "async-trait",
|
|
version = "0.1",
|
|
)
|
|
crate.spec(
|
|
features = ["v4"],
|
|
package = "uuid",
|
|
version = "1.0",
|
|
)
|
|
crate.spec(
|
|
features = ["bundled"],
|
|
package = "rusqlite",
|
|
version = "0.31",
|
|
)
|
|
crate.spec(
|
|
features = ["derive"],
|
|
package = "clap",
|
|
version = "4.0",
|
|
)
|
|
crate.spec(
|
|
features = ["json"],
|
|
package = "axum",
|
|
version = "0.7.2",
|
|
)
|
|
crate.spec(
|
|
package = "tower",
|
|
version = "0.4",
|
|
)
|
|
crate.spec(
|
|
features = ["cors"],
|
|
package = "tower-http",
|
|
version = "0.5",
|
|
)
|
|
crate.spec(
|
|
features = ["full"],
|
|
package = "hyper",
|
|
version = "1.0",
|
|
)
|
|
crate.spec(
|
|
features = ["axum"],
|
|
package = "aide",
|
|
version = "0.13.0",
|
|
)
|
|
crate.spec(
|
|
features = [
|
|
"uuid1",
|
|
"derive",
|
|
],
|
|
package = "schemars",
|
|
version = "0.8.16",
|
|
)
|
|
crate.spec(
|
|
features = ["aide"],
|
|
package = "axum-jsonschema",
|
|
version = "0.8.0",
|
|
)
|
|
crate.spec(
|
|
package = "thiserror",
|
|
version = "1.0",
|
|
)
|
|
crate.spec(
|
|
features = ["debug-embed"],
|
|
package = "rust-embed",
|
|
version = "8.0",
|
|
)
|
|
crate.spec(
|
|
package = "sysinfo",
|
|
version = "0.30",
|
|
)
|
|
crate.spec(
|
|
package = "chrono",
|
|
version = "0.4",
|
|
)
|
|
crate.from_specs()
|
|
use_repo(crate, "crates")
|
|
|
|
# TypeScript and Node.js dependencies for dashboard
|
|
bazel_dep(name = "aspect_rules_ts", version = "3.6.3")
|
|
bazel_dep(name = "aspect_rules_js", version = "2.0.0")
|
|
|
|
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext")
|
|
rules_ts_ext.deps(ts_version_from = "//databuild/dashboard:package.json")
|
|
use_repo(rules_ts_ext, "npm_typescript")
|
|
|
|
bazel_dep(name = "aspect_rules_esbuild", version = "0.21.0")
|
|
|
|
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
|
|
npm.npm_translate_lock(
|
|
name = "npm",
|
|
pnpm_lock = "//databuild/dashboard:pnpm-lock.yaml",
|
|
# verify_node_modules_ignored = "//:.bazelignore",
|
|
)
|
|
use_repo(npm, "npm")
|
|
|
|
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
|
|
|
|
# Allows developers to use the matching pnpm version, for example:
|
|
# bazel run -- @pnpm --dir /home/runner/work/rules_js/rules_js install
|
|
use_repo(pnpm, "pnpm")
|
|
|
|
npm.npm_import(
|
|
name = "mithril",
|
|
package = "mithril",
|
|
version = "2.2.2",
|
|
)
|
|
npm.npm_import(
|
|
name = "types_mithril",
|
|
package = "@types/mithril",
|
|
version = "2.2.7",
|
|
)
|
|
use_repo(npm, "mithril", "types_mithril")
|
|
|
|
# Tailwind
|
|
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
|
|
|
|
http_file(
|
|
name = "tailwind_macos",
|
|
executable = True,
|
|
sha256 = "8b0e5321ed7de33b8962410fa7e680f568366af8007bb9ebcb89cc68f70653f2",
|
|
urls = [
|
|
"https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0/tailwindcss-macos-arm64",
|
|
],
|
|
)
|
|
|
|
http_file(
|
|
name = "tailwind_linux",
|
|
executable = True,
|
|
sha256 = "09c1a5997d68f5e0127d9737593e7dc658fc96dc1851d782a78983d0d6a03c7c",
|
|
urls = [
|
|
"https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0/tailwindcss-linux-x64",
|
|
],
|
|
)
|
|
|
|
# Python
|
|
bazel_dep(name = "rules_python", version = "1.5.1")
|
|
|
|
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
|
|
python.toolchain(
|
|
python_version = "3.13",
|
|
)
|
|
|
|
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
|
pip.parse(
|
|
hub_name = "pypi",
|
|
python_version = "3.13",
|
|
requirements_lock = "//:requirements_lock.txt",
|
|
)
|
|
use_repo(pip, "pypi")
|
|
|
|
# Ruff
|
|
# macOS ARM64 (Apple Silicon)
|
|
http_file(
|
|
name = "ruff_macos_aarch64",
|
|
sha256 = "86b39b4002bb12588af972ad56cfddc1eaa0879c4badb07f0021fae77b5cd958", # Update this
|
|
urls = ["https://github.com/astral-sh/ruff/releases/download/0.12.7/ruff-aarch64-apple-darwin.tar.gz"],
|
|
)
|
|
|
|
# macOS x86_64 (Intel)
|
|
http_file(
|
|
name = "ruff_macos_x86_64",
|
|
sha256 = "f0179a587d5509f32ab16bd95cdf64ddcebc80d653e3674161d366312a4eaf7a", # Update this
|
|
urls = ["https://github.com/astral-sh/ruff/releases/download/0.12.7/ruff-x86_64-apple-darwin.tar.gz"],
|
|
)
|
|
|
|
# Linux x86_64
|
|
http_file(
|
|
name = "ruff_linux_x86_64",
|
|
sha256 = "65b1ec7ba8feda6cbe52aec168f32e5c276577065914fca922b9a8b3f42db433", # Update this
|
|
urls = ["https://github.com/astral-sh/ruff/releases/download/0.12.7/ruff-x86_64-unknown-linux-gnu.tar.gz"],
|
|
)
|
|
|
|
# Linux ARM64
|
|
http_file(
|
|
name = "ruff_linux_aarch64",
|
|
sha256 = "0d4bb492a02cf191a2e1e058cf819c2ed86c05ea444de5e3895ba75c890a9804", # Update this
|
|
urls = ["https://github.com/astral-sh/ruff/releases/download/0.12.7/ruff-aarch64-unknown-linux-gnu.tar.gz"],
|
|
)
|