blob: 003b71f4a93c3c97539ae0f6bbc461c383e4dd16 [file] [log] [blame]
Leopold Schabel5c80aca2019-10-22 15:48:58 +02001load("@bazel_gazelle//:def.bzl", "gazelle")
Serge Bazanskif369cfa2020-05-22 18:36:42 +02002load("//build/fietsje:def.bzl", "fietsje")
Serge Bazanski0ef96292021-05-21 15:41:32 +02003load("@io_bazel_rules_go//go:def.bzl", "go_path")
Leopold Schabel5c80aca2019-10-22 15:48:58 +02004
Serge Bazanski31370b02021-01-07 16:31:14 +01005# gazelle:prefix source.monogon.dev
Serge Bazanskif12bedf2021-01-15 16:58:50 +01006# gazelle:go_naming_convention go_default_library
7# gazelle:go_naming_convention_external go_default_library
Leopold Schabel5c80aca2019-10-22 15:48:58 +02008gazelle(name = "gazelle")
Leopold Schabeld868d692019-11-17 17:28:29 +01009
Serge Bazanskif369cfa2020-05-22 18:36:42 +020010fietsje(name = "fietsje")
11
Leopold Schabeld868d692019-11-17 17:28:29 +010012# Shortcut for the Go SDK
13alias(
14 name = "go",
15 actual = "@go_sdk//:bin/go",
Leopold Schabela4516f92019-12-04 20:27:05 +000016 visibility = ["//visibility:public"],
17)
18
Serge Bazanski7a1b10c2020-02-11 10:02:21 +010019load("@rules_python//python:defs.bzl", "py_runtime_pair")
20
21# Python toolchains - just use the host python for now.
22# TODO(T649): move to external (nix?) interpreters.
23py_runtime(
24 name = "host_python3",
25 interpreter_path = "/usr/bin/python3",
26 python_version = "PY3",
27)
28
29py_runtime(
30 name = "host_python2",
31 interpreter_path = "/usr/bin/python2",
32 python_version = "PY2",
33)
34
35py_runtime_pair(
36 name = "host_python_pair",
37 py2_runtime = ":host_python2",
38 py3_runtime = ":host_python3",
39)
40
41toolchain(
42 name = "host_python",
43 toolchain = ":host_python_pair",
44 toolchain_type = "@rules_python//python:toolchain_type",
45)
Serge Bazanski2fb13a82020-02-11 12:41:37 +010046
Leopold Schabel26d41992020-12-15 19:27:58 +010047# Shortcuts for top-level binaries/tools
48
Serge Bazanski2fb13a82020-02-11 12:41:37 +010049# Shortcut for kubectl when running through bazel run
50# (don't depend on this, it might turn into an env-based PATH shortcut, use
Serge Bazanskibb7db922020-04-30 12:43:10 +020051# @io_k8s_kubernetes//cmd/kubectl instead)
Serge Bazanski2fb13a82020-02-11 12:41:37 +010052alias(
53 name = "kubectl",
Serge Bazanskibb7db922020-04-30 12:43:10 +020054 actual = "@io_k8s_kubernetes//cmd/kubectl:kubectl",
Serge Bazanski2fb13a82020-02-11 12:41:37 +010055)
Leopold Schabel3058b7a2020-06-03 17:51:07 +020056
57# Shortcut for the Delve debugger for interactive debugging
58alias(
59 name = "dlv",
60 actual = "@com_github_go_delve_delve//cmd/dlv:dlv",
61)
Lorenz Brunfc5dbc62020-05-28 12:18:07 +020062
Serge Bazanski662b5b32020-12-21 13:49:00 +010063# Shortcut for launching a single Metropolis node instance in a VM.
Lorenz Brunfc5dbc62020-05-28 12:18:07 +020064alias(
65 name = "launch",
Serge Bazanski77cb6c52020-12-19 00:09:22 +010066 actual = "//metropolis/test/launch/cli/launch",
Lorenz Brunfc5dbc62020-05-28 12:18:07 +020067)
Lorenz Brun52f7f292020-06-24 16:42:02 +020068
Serge Bazanski662b5b32020-12-21 13:49:00 +010069# Shortcut for launching a virtual network a Metropolis cluster consisting of two nodes.
Lorenz Brun52f7f292020-06-24 16:42:02 +020070alias(
71 name = "launch-multi2",
Serge Bazanski77cb6c52020-12-19 00:09:22 +010072 actual = "//metropolis/test/launch/cli/launch-multi2",
Lorenz Brun52f7f292020-06-24 16:42:02 +020073)
Leopold Schabel26d41992020-12-15 19:27:58 +010074
75alias(
76 name = "goimports",
77 actual = "@org_golang_x_tools//cmd/goimports:goimports",
78 visibility = ["//visibility:public"],
79)