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

EAPI=8

CRATES="
	adler2@2.0.0
	aho-corasick@1.1.3
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.18
	anstyle-parse@0.2.6
	anstyle-query@1.1.2
	anstyle-wincon@3.0.7
	anstyle@1.0.10
	anyhow@1.0.97
	arrayvec@0.7.6
	attohttpc@0.29.2
	autocfg@1.4.0
	aws-lc-fips-sys@0.13.3
	aws-lc-rs@1.13.0
	aws-lc-sys@0.28.0
	base64@0.22.1
	beef@0.5.2
	bindgen@0.69.5
	bitflags@1.3.2
	bitflags@2.8.0
	bstr@1.11.3
	bumpalo@3.17.0
	byteorder@1.5.0
	bytes@1.10.0
	cc@1.2.15
	cexpr@0.6.0
	cfg-if@1.0.0
	cfg_aliases@0.2.1
	chrono@0.4.40
	clang-sys@1.8.1
	clap@4.5.35
	clap_builder@4.5.35
	clap_derive@4.5.32
	clap_lex@0.7.4
	cmake@0.1.54
	colorchoice@1.0.3
	core-foundation-sys@0.8.7
	core-foundation@0.10.0
	crc32fast@1.4.2
	crossbeam-channel@0.5.15
	crossbeam-deque@0.8.6
	crossbeam-epoch@0.9.18
	crossbeam-queue@0.3.12
	crossbeam-utils@0.8.21
	crossbeam@0.8.4
	darling@0.20.10
	darling_core@0.20.10
	darling_macro@0.20.10
	defer-drop@1.3.0
	deranged@0.3.11
	derive_builder@0.20.2
	derive_builder_core@0.20.2
	derive_builder_macro@0.20.2
	dirs-next@2.0.0
	dirs-sys-next@0.1.2
	dirs-sys@0.5.0
	dirs@6.0.0
	displaydoc@0.2.5
	dunce@1.0.5
	either@1.13.0
	env_filter@0.1.3
	env_home@0.1.0
	env_logger@0.11.6
	equivalent@1.0.2
	errno@0.3.10
	fastrand@2.3.0
	flate2@1.0.35
	fnv@1.0.7
	form_urlencoded@1.2.1
	fs2@0.4.3
	fs_extra@1.3.0
	fuzzy-matcher@0.3.7
	getrandom@0.2.15
	getrandom@0.3.1
	glob@0.3.2
	hashbrown@0.15.2
	heck@0.5.0
	home@0.5.11
	http@1.2.0
	humantime@2.1.0
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.61
	icu_collections@1.5.0
	icu_locid@1.5.0
	icu_locid_transform@1.5.0
	icu_locid_transform_data@1.5.0
	icu_normalizer@1.5.0
	icu_normalizer_data@1.5.0
	icu_properties@1.5.1
	icu_properties_data@1.5.0
	icu_provider@1.5.0
	icu_provider_macros@1.5.0
	ident_case@1.0.1
	idna@1.0.3
	idna_adapter@1.2.0
	indexmap@2.7.1
	is_terminal_polyfill@1.70.1
	itertools@0.12.1
	itoa@1.0.14
	jobserver@0.1.32
	js-sys@0.3.77
	lazy_static@1.5.0
	lazycell@1.3.0
	libc@0.2.171
	libloading@0.8.6
	libredox@0.1.3
	linux-raw-sys@0.4.15
	linux-raw-sys@0.9.2
	litemap@0.7.4
	log@0.4.26
	memchr@2.7.4
	minimal-lexical@0.2.1
	miniz_oxide@0.8.5
	nix@0.24.3
	nix@0.29.0
	nom@7.1.3
	num-conv@0.1.0
	num-traits@0.2.19
	once_cell@1.20.3
	openssl-probe@0.1.6
	option-ext@0.2.0
	paste@1.0.15
	percent-encoding@2.3.1
	powerfmt@0.2.0
	ppv-lite86@0.2.20
	prettyplease@0.2.29
	proc-macro2@1.0.93
	pulldown-cmark@0.13.0
	quote@1.0.38
	rand@0.9.0
	rand_chacha@0.9.0
	rand_core@0.9.3
	rayon-core@1.12.1
	rayon@1.10.0
	redox_users@0.4.6
	redox_users@0.5.0
	regex-automata@0.4.9
	regex-syntax@0.8.5
	regex@1.11.1
	ring@0.17.14
	rustc-hash@1.1.0
	rustix@0.38.44
	rustix@1.0.2
	rustls-native-certs@0.8.1
	rustls-pki-types@1.11.0
	rustls-webpki@0.102.8
	rustls@0.23.23
	rustversion@1.0.19
	ryu@1.0.19
	schannel@0.1.27
	security-framework-sys@2.14.0
	security-framework@3.2.0
	serde@1.0.219
	serde_derive@1.0.219
	serde_json@1.0.140
	serde_yaml@0.9.34+deprecated
	shell-quote@0.7.2
	shlex@1.3.0
	signal-hook-registry@1.4.2
	signal-hook@0.3.17
	skim@0.16.1
	smallvec@1.14.0
	stable_deref_trait@1.2.0
	strsim@0.11.1
	subtle@2.6.1
	syn@2.0.98
	synstructure@0.13.1
	tempfile@3.19.1
	term@0.7.0
	thiserror-impl@1.0.69
	thiserror-impl@2.0.11
	thiserror@1.0.69
	thiserror@2.0.11
	thread_local@1.1.8
	time-core@0.1.2
	time@0.3.37
	timer@0.2.0
	tinystr@0.7.6
	tuikit@0.5.0
	unicase@2.8.1
	unicode-ident@1.0.17
	unicode-width@0.1.14
	unicode-width@0.2.0
	unsafe-libyaml@0.2.11
	untrusted@0.9.0
	url@2.5.4
	utf16_iter@1.0.5
	utf8_iter@1.0.4
	utf8parse@0.2.2
	vte@0.15.0
	wasi@0.11.0+wasi-snapshot-preview1
	wasi@0.13.3+wasi-0.2.2
	wasm-bindgen-backend@0.2.100
	wasm-bindgen-macro-support@0.2.100
	wasm-bindgen-macro@0.2.100
	wasm-bindgen-shared@0.2.100
	wasm-bindgen@0.2.100
	which@4.4.2
	which@7.0.2
	wildmatch@2.4.0
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-core@0.52.0
	windows-link@0.1.0
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-targets@0.52.6
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.52.6
	winsafe@0.0.19
	wit-bindgen-rt@0.33.0
	write16@1.0.0
	writeable@0.5.5
	yoke-derive@0.7.5
	yoke@0.7.5
	zerocopy-derive@0.7.35
	zerocopy-derive@0.8.23
	zerocopy@0.7.35
	zerocopy@0.8.23
	zerofrom-derive@0.1.5
	zerofrom@0.1.5
	zeroize@1.8.1
	zerovec-derive@0.10.3
	zerovec@0.10.4
"

inherit cargo

DESCRIPTION="A more powerful alternative to kubectx and kubens."
HOMEPAGE="https://github.com/sbstp/kubie"
SRC_URI="https://github.com/sbstp/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
		${CARGO_CRATE_URIS}"

# License set may be more restrictive as OR is not respected
# use cargo-license for a more accurate license picture
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~amd64"

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=">=dev-lang/rust-1.74"

# rust does not use *FLAGS from make.conf, silence portage warning
# update with proper path to binaries this crate installs, omit leading /
QA_FLAGS_IGNORED="usr/bin/${PN}"

src_compile() {
	# Disable self update functionality
	cargo_src_compile --no-default-features
}
