generated from albertocavalcante/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MODULE.bazel
55 lines (45 loc) · 1.55 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
"""garf"""
module(
name = "garf",
version = "0.0.1",
)
bazel_dep(name = "rules_go", version = "0.50.0")
bazel_dep(name = "gazelle", version = "0.38.0")
# jfrog-client-go depends on cloudflare/circl
# CGO structure used by circl is not supported by Gazelle
# Reference: https://github.com/bazelbuild/rules_go/issues/3799#issuecomment-1880035642
#
# Version must be kept in sync with the one in go.mod
bazel_dep(name = "circl", version = "1.3.7")
# circl has cc_library targets which needs a C++ toolchain
bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.0")
toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains")
use_repo(toolchains, "zig_sdk")
register_toolchains(
# Linux
# Use musl as per:
# https://honnef.co/articles/statically-compiled-go-programs-always-even-with-cgo-using-musl/
"@zig_sdk//toolchain:linux_amd64_musl",
"@zig_sdk//toolchain:linux_arm64_musl",
# Windows
"@zig_sdk//toolchain:windows_amd64",
"@zig_sdk//toolchain:windows_arm64",
)
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.23.0")
go_sdk.nogo(nogo = "//:garf_nogo")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
# nogo dependency
go_deps.module(
path = "golang.org/x/tools",
sum = "h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=",
version = "v0.23.0",
)
# managed by `bazel mod tidy`
use_repo(
go_deps,
"com_github_jfrog_jfrog_client_go",
"com_github_spf13_cobra",
"org_golang_x_tools",
)