diff options
Diffstat (limited to 'tools/build_rules/go/def.bzl')
-rw-r--r-- | tools/build_rules/go/def.bzl | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/build_rules/go/def.bzl b/tools/build_rules/go/def.bzl index 1ce34770bd..647371fff1 100644 --- a/tools/build_rules/go/def.bzl +++ b/tools/build_rules/go/def.bzl @@ -380,17 +380,32 @@ go_test = rule( test = True, ) +GO_TOOLCHAIN_BUILD_FILE = """ +package( + default_visibility = [ "//visibility:public" ]) + +filegroup( + name = "toolchain", + srcs = glob(["go/bin/*", "go/pkg/**", ]), +) + +filegroup( + name = "go_tool", + srcs = [ "go/bin/go" ], +) +""" + def go_repositories(): native.new_http_archive( name= "golang_linux_amd64", url = "https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz", - build_file = "tools/build_rules/go/toolchain/BUILD.go-toolchain", + build_file_content = GO_TOOLCHAIN_BUILD_FILE, sha256 = "2593132ca490b9ee17509d65ee2cd078441ff544899f6afb97a03d08c25524e7" ) native.new_http_archive( name= "golang_darwin_amd64", url = "https://storage.googleapis.com/golang/go1.5.1.darwin-amd64.tar.gz", - build_file = "tools/build_rules/go/toolchain/BUILD.go-toolchain", + build_file_content = GO_TOOLCHAIN_BUILD_FILE, sha256 = "e94487b8cd2e0239f27dc51e6c6464383b10acb491f753584605e9b28abf48fb" ) |