Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 1 | load("@bazel_gazelle//:def.bzl", "gazelle") |
Serge Bazanski | 0ef9629 | 2021-05-21 15:41:32 +0200 | [diff] [blame] | 2 | load("@io_bazel_rules_go//go:def.bzl", "go_path") |
Leopold | be326c2 | 2023-01-04 20:42:59 +0100 | [diff] [blame] | 3 | load("@bazeldnf//:def.bzl", "bazeldnf") |
Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 4 | |
Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame] | 5 | # gazelle:prefix source.monogon.dev |
Lorenz Brun | d13c1c6 | 2022-03-30 19:58:58 +0200 | [diff] [blame] | 6 | # gazelle:go_naming_convention import |
Serge Bazanski | fdc3a24 | 2022-04-06 15:56:38 +0200 | [diff] [blame] | 7 | # gazelle:exclude **/gomod-generated-placeholder.go |
Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 8 | gazelle(name = "gazelle") |
Leopold Schabel | d868d69 | 2019-11-17 17:28:29 +0100 | [diff] [blame] | 9 | |
Serge Bazanski | ee4bfdb | 2022-04-06 15:30:52 +0200 | [diff] [blame] | 10 | gazelle( |
| 11 | name = "gazelle-update-repos", |
| 12 | args = [ |
| 13 | "-from_file=go.mod", |
| 14 | "-to_macro=third_party/go/repositories.bzl%go_repositories", |
| 15 | "-prune", |
| 16 | ], |
| 17 | command = "update-repos", |
Serge Bazanski | 116c4a6 | 2021-09-24 14:22:27 +0200 | [diff] [blame] | 18 | ) |
Serge Bazanski | f369cfa | 2020-05-22 18:36:42 +0200 | [diff] [blame] | 19 | |
Leopold Schabel | d868d69 | 2019-11-17 17:28:29 +0100 | [diff] [blame] | 20 | # Shortcut for the Go SDK |
| 21 | alias( |
| 22 | name = "go", |
| 23 | actual = "@go_sdk//:bin/go", |
Leopold Schabel | a4516f9 | 2019-12-04 20:27:05 +0000 | [diff] [blame] | 24 | visibility = ["//visibility:public"], |
| 25 | ) |
| 26 | |
Serge Bazanski | 7a1b10c | 2020-02-11 10:02:21 +0100 | [diff] [blame] | 27 | load("@rules_python//python:defs.bzl", "py_runtime_pair") |
| 28 | |
| 29 | # Python toolchains - just use the host python for now. |
| 30 | # TODO(T649): move to external (nix?) interpreters. |
| 31 | py_runtime( |
| 32 | name = "host_python3", |
| 33 | interpreter_path = "/usr/bin/python3", |
| 34 | python_version = "PY3", |
| 35 | ) |
| 36 | |
| 37 | py_runtime( |
| 38 | name = "host_python2", |
| 39 | interpreter_path = "/usr/bin/python2", |
| 40 | python_version = "PY2", |
| 41 | ) |
| 42 | |
| 43 | py_runtime_pair( |
| 44 | name = "host_python_pair", |
| 45 | py2_runtime = ":host_python2", |
| 46 | py3_runtime = ":host_python3", |
| 47 | ) |
| 48 | |
| 49 | toolchain( |
| 50 | name = "host_python", |
| 51 | toolchain = ":host_python_pair", |
| 52 | toolchain_type = "@rules_python//python:toolchain_type", |
| 53 | ) |
Serge Bazanski | 2fb13a8 | 2020-02-11 12:41:37 +0100 | [diff] [blame] | 54 | |
Leopold | be326c2 | 2023-01-04 20:42:59 +0100 | [diff] [blame] | 55 | # bazeldnf binary |
| 56 | bazeldnf(name = "bazeldnf") |
| 57 | |
Leopold Schabel | 26d4199 | 2020-12-15 19:27:58 +0100 | [diff] [blame] | 58 | # Shortcuts for top-level binaries/tools |
| 59 | |
Serge Bazanski | 2fb13a8 | 2020-02-11 12:41:37 +0100 | [diff] [blame] | 60 | # Shortcut for kubectl when running through bazel run |
| 61 | # (don't depend on this, it might turn into an env-based PATH shortcut, use |
Serge Bazanski | bb7db92 | 2020-04-30 12:43:10 +0200 | [diff] [blame] | 62 | # @io_k8s_kubernetes//cmd/kubectl instead) |
Serge Bazanski | 2fb13a8 | 2020-02-11 12:41:37 +0100 | [diff] [blame] | 63 | alias( |
| 64 | name = "kubectl", |
Serge Bazanski | bb7db92 | 2020-04-30 12:43:10 +0200 | [diff] [blame] | 65 | actual = "@io_k8s_kubernetes//cmd/kubectl:kubectl", |
Serge Bazanski | 2fb13a8 | 2020-02-11 12:41:37 +0100 | [diff] [blame] | 66 | ) |
Leopold Schabel | 3058b7a | 2020-06-03 17:51:07 +0200 | [diff] [blame] | 67 | |
| 68 | # Shortcut for the Delve debugger for interactive debugging |
| 69 | alias( |
| 70 | name = "dlv", |
| 71 | actual = "@com_github_go_delve_delve//cmd/dlv:dlv", |
| 72 | ) |
Lorenz Brun | fc5dbc6 | 2020-05-28 12:18:07 +0200 | [diff] [blame] | 73 | |
Serge Bazanski | 662b5b3 | 2020-12-21 13:49:00 +0100 | [diff] [blame] | 74 | # Shortcut for launching a single Metropolis node instance in a VM. |
Lorenz Brun | fc5dbc6 | 2020-05-28 12:18:07 +0200 | [diff] [blame] | 75 | alias( |
| 76 | name = "launch", |
Serge Bazanski | 77cb6c5 | 2020-12-19 00:09:22 +0100 | [diff] [blame] | 77 | actual = "//metropolis/test/launch/cli/launch", |
Lorenz Brun | fc5dbc6 | 2020-05-28 12:18:07 +0200 | [diff] [blame] | 78 | ) |
Lorenz Brun | 52f7f29 | 2020-06-24 16:42:02 +0200 | [diff] [blame] | 79 | |
Serge Bazanski | 662b5b3 | 2020-12-21 13:49:00 +0100 | [diff] [blame] | 80 | # Shortcut for launching a virtual network a Metropolis cluster consisting of two nodes. |
Lorenz Brun | 52f7f29 | 2020-06-24 16:42:02 +0200 | [diff] [blame] | 81 | alias( |
| 82 | name = "launch-multi2", |
Serge Bazanski | 77cb6c5 | 2020-12-19 00:09:22 +0100 | [diff] [blame] | 83 | actual = "//metropolis/test/launch/cli/launch-multi2", |
Lorenz Brun | 52f7f29 | 2020-06-24 16:42:02 +0200 | [diff] [blame] | 84 | ) |
Leopold Schabel | 26d4199 | 2020-12-15 19:27:58 +0100 | [diff] [blame] | 85 | |
| 86 | alias( |
Leopold Schabel | d212014 | 2021-12-03 21:30:49 +0100 | [diff] [blame] | 87 | name = "metroctl", |
| 88 | actual = "//metropolis/cli/metroctl:metroctl", |
| 89 | ) |
| 90 | |
| 91 | alias( |
Leopold Schabel | 26d4199 | 2020-12-15 19:27:58 +0100 | [diff] [blame] | 92 | name = "goimports", |
| 93 | actual = "@org_golang_x_tools//cmd/goimports:goimports", |
| 94 | visibility = ["//visibility:public"], |
| 95 | ) |