BUILD.bazel 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. load("@io_bazel_rules_go//go:def.bzl", "go_library")
  2. go_library(
  3. name = "go_default_library",
  4. srcs = [
  5. "host.go",
  6. "host_darwin.go",
  7. "host_darwin_386.go",
  8. "host_darwin_amd64.go",
  9. "host_fallback.go",
  10. "host_freebsd.go",
  11. "host_freebsd_386.go",
  12. "host_freebsd_amd64.go",
  13. "host_freebsd_arm.go",
  14. "host_linux.go",
  15. "host_linux_386.go",
  16. "host_linux_amd64.go",
  17. "host_linux_arm.go",
  18. "host_linux_arm64.go",
  19. "host_linux_mips.go",
  20. "host_linux_mips64.go",
  21. "host_linux_mips64le.go",
  22. "host_linux_mipsle.go",
  23. "host_linux_ppc64le.go",
  24. "host_linux_s390x.go",
  25. "host_openbsd.go",
  26. "host_openbsd_amd64.go",
  27. "host_solaris.go",
  28. "host_windows.go",
  29. ],
  30. importmap = "go-common/vendor/github.com/shirou/gopsutil/host",
  31. importpath = "github.com/shirou/gopsutil/host",
  32. visibility = ["//visibility:public"],
  33. deps = [
  34. "//vendor/github.com/shirou/gopsutil/internal/common:go_default_library",
  35. ] + select({
  36. "@io_bazel_rules_go//go/platform:darwin": [
  37. "//vendor/github.com/shirou/gopsutil/process:go_default_library",
  38. ],
  39. "@io_bazel_rules_go//go/platform:freebsd": [
  40. "//vendor/github.com/shirou/gopsutil/process:go_default_library",
  41. "//vendor/golang.org/x/sys/unix:go_default_library",
  42. ],
  43. "@io_bazel_rules_go//go/platform:openbsd": [
  44. "//vendor/github.com/shirou/gopsutil/process:go_default_library",
  45. ],
  46. "@io_bazel_rules_go//go/platform:windows": [
  47. "//vendor/github.com/StackExchange/wmi:go_default_library",
  48. "//vendor/github.com/shirou/gopsutil/process:go_default_library",
  49. "//vendor/golang.org/x/sys/windows:go_default_library",
  50. ],
  51. "//conditions:default": [],
  52. }),
  53. )
  54. filegroup(
  55. name = "package-srcs",
  56. srcs = glob(["**"]),
  57. tags = ["automanaged"],
  58. visibility = ["//visibility:private"],
  59. )
  60. filegroup(
  61. name = "all-srcs",
  62. srcs = [":package-srcs"],
  63. tags = ["automanaged"],
  64. visibility = ["//visibility:public"],
  65. )