# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module

DESCRIPTION="Show who has RBAC permissions to perform actions on different resources in Kubernetes"
HOMEPAGE="https://github.com/aquasecurity/kubectl-who-can"
SRC_URI="https://github.com/aquasecurity/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
		https://git.millerson.name/alex/gentoo-artifacts/releases/download/${P}-vendor/${P}-vendor.tar.xz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

src_compile() {
    ego build -o ${PN} ./cmd/kubectl-who-can/main.go || die
}

src_install() {
    dobin ${PN}
}
