WORKSPACE 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
  2. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  3. http_archive(
  4. name = "io_bazel_rules_go",
  5. url = "http://bazel-cabin.bilibili.co/go/rules_go/rules_go-0.16.4-hack.tar.gz",
  6. sha256 = "891470f5ea5026891f76f66122c7a7d13255c1905cb5ce4ee01c4b46278f9201",
  7. )
  8. http_archive(
  9. name = "bazel_skylib",
  10. sha256 = "b5f6abe419da897b7901f90cbab08af958b97a8f3575b0d3dd062ac7ce78541f",
  11. strip_prefix = "bazel-skylib-0.5.0",
  12. urls = ["http://bazel-cabin.bilibili.co/bazel-skylib/0.5.0.tar.gz"],
  13. )
  14. http_archive(
  15. name = "bazel_gazelle",
  16. urls = ["http://bazel-cabin.bilibili.co/go/gazelle/bazel-gazelle-0.15.0.tar.gz"],
  17. sha256 = "6e875ab4b6bf64a38c352887760f21203ab054676d9c1b274963907e0768740d",
  18. )
  19. load("@bazel_skylib//:lib.bzl", "versions")
  20. versions.check(minimum_bazel_version = "0.15.0")
  21. load("@io_bazel_rules_go//go:def.bzl", "go_download_sdk")
  22. go_download_sdk(
  23. name = "go_sdk",
  24. urls = ["http://bazel-cabin.bilibili.co/go/{}"],
  25. sdks = {
  26. "linux_amd64": ("go1.11.4.linux-amd64.tar.gz",
  27. "fb26c30e6a04ad937bbc657a1b5bba92f80096af1e8ee6da6430c045a8db3a5b"),
  28. "darwin_amd64": ("go1.11.4.darwin-amd64.tar.gz",
  29. "48ea987fb610894b3108ecf42e7a4fd1c1e3eabcaeb570e388c75af1f1375f80"),
  30. "windows_amd64": ("go1.11.4.windows-amd64.zip",
  31. "eeb20e21702f2b9469d9381df5de85e2f731b64a1f54effe196d0f7d0227fe14"),
  32. },
  33. )
  34. load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
  35. #go_repository(
  36. # name = "org_golang_x_tools",
  37. # # release-branch.go1.9, as of 2017-08-25
  38. # urls = ["http://bazel-cabin.bilibili.co/golang-lib/tools/3e7aa9e59977626dc60433e9aeadf1bb63d28295"],
  39. # importpath = "golang.org/x/tools",
  40. # strip_prefix = "tools-3e7aa9e59977626dc60433e9aeadf1bb63d28295",
  41. # type = "zip",
  42. # patches = [
  43. # "@io_bazel_rules_go//third_party:org_golang_x_tools-gazelle.patch",
  44. # "@io_bazel_rules_go//third_party:org_golang_x_tools-extras.patch",
  45. # ],
  46. # patch_args = ["-p1"],
  47. #)#
  48. go_repository(
  49. name = "com_google_protobuf",
  50. build_file_proto_mode = "disable_global",
  51. importpath = "github.com/google/protobuf",
  52. urls = ["http://bazel-cabin.bilibili.co/google/protobuf/48cb18e5c419ddd23d9badcfe4e9df7bde1979b2"],
  53. strip_prefix = "protobuf-48cb18e5c419ddd23d9badcfe4e9df7bde1979b2",
  54. type = "zip",
  55. )
  56. go_repository(
  57. name = "org_golang_x_net",
  58. urls = ["http://bazel-cabin.bilibili.co/golang-lib/golang/net/4dfa2610cdf3b287375bbba5b8f2a14d3b01d8de"],
  59. importpath = "golang.org/x/net",
  60. strip_prefix = "net-4dfa2610cdf3b287375bbba5b8f2a14d3b01d8de",
  61. type = "zip",
  62. )
  63. go_repository(
  64. name = "org_golang_google_genproto",
  65. build_file_proto_mode = "disable_global",
  66. urls = ["http://bazel-cabin.bilibili.co/golang-lib/go-genproto/c7e5094acea1ca1b899e2259d80a6b0f882f81f8"],
  67. strip_prefix = "go-genproto-c7e5094acea1ca1b899e2259d80a6b0f882f81f8",
  68. type = "zip",
  69. importpath = "github.com/google/go-genproto",
  70. )
  71. go_repository(
  72. name = "com_github_gogo_protobuf",
  73. build_file_proto_mode = "disable_global",
  74. urls = ["http://bazel-cabin.bilibili.co/golang-lib/gogo/636bf0302bc95575d69441b25a2603156ffdddf1"],
  75. strip_prefix = "protobuf-636bf0302bc95575d69441b25a2603156ffdddf1",
  76. importpath = "github.com/gogo/protobuf",
  77. type = "zip",
  78. )
  79. go_repository(
  80. name = "org_golang_x_text",
  81. urls = ["http://bazel-cabin.bilibili.co/golang-lib/golang/text/f21a4dfb5e38f5895301dc265a8def02365cc3d0"],
  82. strip_prefix = "text-f21a4dfb5e38f5895301dc265a8def02365cc3d0",
  83. type = "zip",
  84. importpath = "golang.org/x/text",
  85. )#
  86. go_repository(
  87. name = "org_golang_google_grpc",
  88. #build_file_proto_mode = "disable_global",
  89. urls = ["http://bazel-cabin.bilibili.co/golang-lib/grpc-go/df014850f6dee74ba2fc94874043a9f3f75fbfd8"],
  90. strip_prefix = "grpc-go-df014850f6dee74ba2fc94874043a9f3f75fbfd8",
  91. type = "zip",
  92. importpath = "google.golang.org/grpc",
  93. )
  94. go_repository(
  95. name = "go_googleapis",
  96. build_file_proto_mode = "disable_global",
  97. urls = ["http://bazel-cabin.bilibili.co/golang-lib/googleapis/b71d0c74de0b84f2f10a2c61cd66fbb48873709f"],
  98. strip_prefix = "googleapis-b71d0c74de0b84f2f10a2c61cd66fbb48873709f",
  99. type = "zip",
  100. importpath = "google.golang.org/api",
  101. patches = [
  102. "@io_bazel_rules_go//third_party:go_googleapis-directives.patch",
  103. "@io_bazel_rules_go//third_party:go_googleapis-gazelle.patch",
  104. "@io_bazel_rules_go//third_party:go_googleapis-fix.patch",
  105. ],
  106. patch_args = ["-p1"],
  107. )
  108. go_repository(
  109. name = "com_github_golang_protobuf",
  110. build_file_proto_mode = "disable_global",
  111. urls = ["http://bazel-cabin.bilibili.co/golang-lib/golang/protobuf/aa810b61a9c79d51363740d207bb46cf8e620ed5"],
  112. strip_prefix = "protobuf-aa810b61a9c79d51363740d207bb46cf8e620ed5",
  113. type = "zip",
  114. importpath = "github.com/golang/protobuf",
  115. patch_args = ["-p1"],
  116. patches = ["@io_bazel_rules_go//third_party:com_github_golang_protobuf-extras.patch"],
  117. )
  118. go_repository(
  119. name = "org_golang_x_sys",
  120. importpath = "golang.org/x/sys",
  121. urls = ["http://bazel-cabin.bilibili.co/golang-lib/sys/e4b3c5e9061176387e7cea65e4dc5853801f3fb7"],
  122. strip_prefix = "sys-e4b3c5e9061176387e7cea65e4dc5853801f3fb7",
  123. type = "zip",
  124. )
  125. gazelle_dependencies()
  126. load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
  127. go_rules_dependencies()
  128. go_register_toolchains()
  129. load("//build:workspace.bzl", "bili_workspace")
  130. bili_workspace()