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

# Auto-Generated by cargo-ebuild 0.5.4-r1

EAPI=8

CRATES="
	addr2line@0.24.2
	adler2@2.0.0
	ahash@0.8.11
	allocator-api2@0.2.18
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.14
	anstyle-parse@0.2.4
	anstyle-query@1.0.3
	anstyle-wincon@3.0.3
	anstyle@1.0.10
	autocfg@1.3.0
	backtrace@0.3.74
	base64@0.21.7
	base64@0.22.1
	bitflags@2.5.0
	block@0.1.6
	bumpalo@3.16.0
	calloop-wayland-source@0.2.0
	calloop@0.12.4
	cargo-husky@1.5.0
	cassowary@0.3.0
	castaway@0.2.3
	cc@1.0.98
	cfg-if@1.0.0
	chrono@0.4.38
	clap@4.5.23
	clap_builder@4.5.23
	clap_derive@4.5.18
	clap_lex@0.7.4
	clipboard-win@3.1.1
	colorchoice@1.0.1
	compact_str@0.8.0
	concurrent-queue@2.5.0
	copypasta@0.10.1
	core-foundation-sys@0.8.6
	crossbeam-utils@0.8.20
	crossterm@0.28.1
	crossterm_winapi@0.9.1
	cursor-icon@1.1.0
	darling@0.20.10
	darling_core@0.20.10
	darling_macro@0.20.10
	deranged@0.3.11
	diff@0.1.13
	dlib@0.5.2
	downcast-rs@1.2.1
	either@1.12.0
	equivalent@1.0.1
	errno@0.3.9
	fnv@1.0.7
	gethostname@0.4.3
	getrandom@0.2.15
	gimli@0.31.1
	hashbrown@0.14.5
	heck@0.5.0
	hermit-abi@0.3.9
	human-panic@2.0.2
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.60
	ident_case@1.0.1
	indexmap@2.2.6
	indoc@2.0.5
	instability@0.3.3
	is_terminal_polyfill@1.70.0
	itertools@0.12.1
	itertools@0.13.0
	itoa@1.0.11
	js-sys@0.3.69
	jsonwebtoken@9.3.0
	lazy-bytes-cast@5.0.1
	libc@0.2.167
	libloading@0.8.3
	linux-raw-sys@0.4.14
	lock_api@0.4.12
	log@0.4.21
	lru@0.12.3
	malloc_buf@0.0.6
	memchr@2.7.2
	memmap2@0.9.4
	miniz_oxide@0.8.0
	mio@1.0.3
	num-bigint@0.4.5
	num-conv@0.1.0
	num-integer@0.1.46
	num-traits@0.2.19
	objc-foundation@0.1.1
	objc@0.2.7
	objc_id@0.1.1
	object@0.36.0
	once_cell@1.19.0
	os_info@3.8.2
	parking_lot@0.12.2
	parking_lot_core@0.9.10
	paste@1.0.15
	pem@3.0.4
	pin-project-lite@0.2.14
	pkg-config@0.3.30
	polling@3.7.0
	powerfmt@0.2.0
	pretty_assertions@1.4.1
	proc-macro2@1.0.92
	quick-xml@0.31.0
	quote@1.0.36
	ratatui@0.29.0
	redox_syscall@0.5.1
	ring@0.17.8
	rustc-demangle@0.1.24
	rustix@0.38.34
	rustversion@1.0.17
	ryu@1.0.18
	scoped-tls@1.0.1
	scopeguard@1.2.0
	serde@1.0.215
	serde_derive@1.0.215
	serde_json@1.0.133
	serde_spanned@0.6.6
	signal-hook-mio@0.2.4
	signal-hook-registry@1.4.2
	signal-hook@0.3.17
	simple_asn1@0.6.2
	slab@0.4.9
	smallvec@1.13.2
	smithay-client-toolkit@0.18.1
	smithay-clipboard@0.7.1
	spin@0.9.8
	static_assertions@1.1.0
	strsim@0.11.1
	strum@0.26.3
	strum_macros@0.26.4
	syn@2.0.90
	thiserror-impl@1.0.61
	thiserror@1.0.61
	time-core@0.1.2
	time-macros@0.2.18
	time@0.3.36
	toml@0.8.13
	toml_datetime@0.6.6
	toml_edit@0.22.13
	tracing-core@0.1.32
	tracing@0.1.40
	tui-input@0.11.1
	tui-textarea@0.7.0
	unicode-ident@1.0.12
	unicode-segmentation@1.11.0
	unicode-truncate@1.0.0
	unicode-width@0.1.13
	unicode-width@0.2.0
	untrusted@0.9.0
	utf8parse@0.2.1
	uuid@1.8.0
	version_check@0.9.4
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.92
	wasm-bindgen-macro-support@0.2.92
	wasm-bindgen-macro@0.2.92
	wasm-bindgen-shared@0.2.92
	wasm-bindgen@0.2.92
	wayland-backend@0.3.3
	wayland-client@0.31.2
	wayland-csd-frame@0.3.0
	wayland-cursor@0.31.1
	wayland-protocols-wlr@0.2.0
	wayland-protocols@0.31.2
	wayland-scanner@0.31.1
	wayland-sys@0.31.1
	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-sys@0.52.0
	windows-targets@0.48.5
	windows-targets@0.52.6
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.6
	x11-clipboard@0.9.2
	x11rb-protocol@0.13.1
	x11rb@0.13.1
	xcursor@0.3.5
	xkeysym@0.2.0
	yansi@1.0.1
	zerocopy-derive@0.7.34
	zerocopy@0.7.34
"

inherit cargo

DESCRIPTION="A Terminal UI for decoding/encoding JSON Web Tokens"
# Double check the homepage as the cargo_metadata crate
# does not provide this value so instead repository is used
HOMEPAGE="https://github.com/jwt-rs/jwt-ui"
SRC_URI="
	https://github.com/jwt-rs/jwt-ui/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="MIT"
# Dependent crate licenses
LICENSE+=" Apache-2.0 Boost-1.0 ISC MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"

# 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_test() {
	# Upstream tests share a test.txt working file.
	cargo_env "${CARGO}" test $(usex debug "" --release) ${ECARGO_ARGS[@]} -- --test-threads=1 \
		|| die "cargo test failed"
}