app-containers/k3d - 5.9.0 (gentoo)

Search

Install

Install this version:

emerge -a =app-containers/k3d-5.9.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-containers/k3d-5.9.0

Or alternatively:

emerge --autounmask-write -a =app-containers/k3d-5.9.0

Package Information

Description:
k3d creates k3s clusters in docker
Homepage:
https://github.com/rancher/k3d
License:
MIT Apache-2.0 BSD BSD-2 MPL-2.0 ISC

Ebuild Details

Version EAPI Keywords Slot
5.9.0 8 ~amd64 0
View Raw Ebuild
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module shell-completion sysroot

K3D_K3S_TAG=v1.36.1-k3s1

DESCRIPTION="k3d creates k3s clusters in docker"
HOMEPAGE="https://github.com/rancher/k3d"
SRC_URI="https://github.com/rancher/k3d/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0 ISC"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc"

BDEPEND=">=dev-lang/go-1.26.3"

src_compile() {
	local ldflags=(
		-w
		-X "github.com/k3d-io/k3d/v5/version.Version=v${PV}"
		-X "github.com/k3d-io/k3d/v5/version.K3sVersion=${K3D_K3S_TAG}"
	)
	local -x GOWORK="" CGO_ENABLED=1
	ego build -ldflags "${ldflags[*]}" -o bin/k3d

	einfo "generating shell completion files"
	sysroot_try_run_prefixed ./bin/k3d completion bash > ${PN}.bash || die
	sysroot_try_run_prefixed ./bin/k3d completion zsh > ${PN}.zsh || die
	sysroot_try_run_prefixed ./bin/k3d completion fish > ${PN}.fish || die
}

src_test() {
	ego test -v ./... -skip "TestGetK3sVersion"
}

src_install() {
	dobin bin/${PN}

	[[ -s ${PN}.bash ]] && newbashcomp ${PN}.bash ${PN}
	[[ -s ${PN}.zsh ]] && newzshcomp ${PN}.zsh _${PN}
	[[ -s ${PN}.fish ]] && dofishcomp ${PN}.fish

	DOCS=( *.md )
	use doc && DOCS+=( docs )
	einstalldocs
}

USE Flags

Manage flags for this package: euse -i <flag> -p app-containers/k3d | euse -E <flag> -p app-containers/k3d | euse -D <flag> -p app-containers/k3d

Global/Standard Flags

doc

Inherited Eclasses

Dependencies

BDEPEND

>=dev-lang/go-1.26.3

Manifest for 5.9.0

Type File Size Source URLs
DIST k3d-5.9.0.tar.gz 8955790 bytes https://github.com/rancher/k3d/archive/refs/tags/v5.9.0.tar.gz