module(
    name = "rules_wails",
    version = "0.1.0",
)

bazel_dep(
    name = "rules_go",
    repo_name = "io_bazel_rules_go",
    version = "0.60.0",
)
bazel_dep(name = "gazelle", version = "0.40.0")
bazel_dep(name = "rules_bun", version = "0.2.3")
bazel_dep(name = "rules_shell", version = "0.6.1")

archive_override(
    module_name = "rules_bun",
    strip_prefix = "rules_bun",
    urls = ["https://git.dgren.dev/eric/rules_bun/archive/v0.2.3.tar.gz"],
)

bun_ext = use_extension("@rules_bun//bun:extensions.bzl", "bun")
use_repo(
    bun_ext,
    "bun_darwin_aarch64",
    "bun_darwin_x64",
    "bun_linux_aarch64",
    "bun_linux_x64",
    "bun_windows_x64",
)

register_toolchains(
    "@rules_bun//bun:darwin_aarch64_toolchain",
    "@rules_bun//bun:darwin_x64_toolchain",
    "@rules_bun//bun:linux_aarch64_toolchain",
    "@rules_bun//bun:linux_x64_toolchain",
    "@rules_bun//bun:windows_x64_toolchain",
)

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")

use_repo(
    go_deps,
    "bazel_gazelle_go_repository_config",
    "com_github_wailsapp_wails_v3",
    "org_golang_x_mod",
)
