forked from hswaw/hscloud
tools: remove unused go_sdk.bzl
This is a leftover from an old attempt at NixOS compatibility. Change-Id: I5050f76b83f47796cdfa6235db8ee5efe8daf3e2
This commit is contained in:
parent
4e8622df35
commit
f00a701f27
1 changed files with 0 additions and 31 deletions
|
@ -1,31 +0,0 @@
|
|||
def _gen_imports_impl(ctx):
|
||||
ctx.file("BUILD", "")
|
||||
|
||||
if "hscloud_root" not in ctx.os.environ:
|
||||
fail("Please souce env.sh")
|
||||
|
||||
is_nixos = "hscloud_nixos" in ctx.os.environ
|
||||
bzl_file_content = """
|
||||
load(
|
||||
"@io_bazel_rules_go//go:deps.bzl",
|
||||
"go_register_toolchains",
|
||||
"go_rules_dependencies",
|
||||
)
|
||||
def load_go_sdk():
|
||||
go_rules_dependencies()
|
||||
go_register_toolchains({go_version})
|
||||
""".format(
|
||||
go_version = 'go_version = "host"' if is_nixos else "",
|
||||
)
|
||||
|
||||
ctx.file("imports.bzl", bzl_file_content)
|
||||
|
||||
_gen_imports = repository_rule(
|
||||
implementation = _gen_imports_impl,
|
||||
attrs = dict(),
|
||||
)
|
||||
|
||||
def gen_imports(name):
|
||||
_gen_imports(
|
||||
name = name,
|
||||
)
|
Loading…
Reference in a new issue