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

# Autogenerated by pycargoebuild 0.13.2

EAPI=8

CRATES="
	addr2line@0.21.0
	adler@1.0.2
	aes@0.8.3
	aho-corasick@1.1.2
	anstream@0.6.5
	anstyle-parse@0.2.3
	anstyle-query@1.0.2
	anstyle-wincon@3.0.2
	anstyle@1.0.4
	anyhow@1.0.78
	argon2@0.5.2
	arrayvec@0.7.4
	async-trait@0.1.76
	autocfg@1.1.0
	backtrace@0.3.69
	base32@0.4.0
	base64@0.21.5
	base64ct@1.6.0
	bitflags@1.3.2
	bitflags@2.4.1
	blake2@0.10.6
	block-buffer@0.10.4
	block-padding@0.3.3
	block@0.1.6
	bumpalo@3.14.0
	byteorder@1.5.0
	bytes@1.5.0
	calloop-wayland-source@0.2.0
	calloop@0.12.3
	cbc@0.1.2
	cc@1.0.83
	cfg-if@1.0.0
	cipher@0.4.4
	clap@4.4.12
	clap_builder@4.4.12
	clap_complete@4.4.5
	clap_derive@4.4.7
	clap_lex@0.6.0
	clipboard-win@3.1.1
	colorchoice@1.0.0
	concurrent-queue@2.4.0
	const-oid@0.9.6
	copypasta@0.10.0
	core-foundation-sys@0.8.6
	core-foundation@0.9.4
	cpufeatures@0.2.11
	crossbeam-utils@0.8.18
	crypto-common@0.1.6
	cursor-icon@1.1.0
	daemonize@0.5.0
	data-encoding@2.5.0
	der@0.7.8
	digest@0.10.7
	directories@5.0.0
	dirs-sys@0.4.0
	dlib@0.5.2
	downcast-rs@1.2.0
	encoding_rs@0.8.33
	env_logger@0.10.1
	equivalent@1.0.1
	errno@0.3.8
	fastrand@2.0.1
	fnv@1.0.7
	form_urlencoded@1.2.1
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-executor@0.3.30
	futures-io@0.3.30
	futures-macro@0.3.30
	futures-sink@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	futures@0.3.30
	generic-array@0.14.7
	gethostname@0.3.0
	getrandom@0.2.11
	gimli@0.28.1
	h2@0.3.22
	hashbrown@0.14.3
	heck@0.4.1
	hermit-abi@0.3.3
	hkdf@0.12.4
	hmac@0.12.1
	http-body@0.4.6
	http@0.2.11
	httparse@1.8.0
	httpdate@1.0.3
	humantime@2.1.0
	hyper-rustls@0.24.2
	hyper@0.14.28
	idna@0.5.0
	indexmap@2.1.0
	inout@0.1.3
	ipnet@2.9.0
	is-terminal@0.4.10
	itoa@1.0.10
	js-sys@0.3.66
	lazy-bytes-cast@5.0.1
	lazy_static@1.4.0
	libc@0.2.151
	libloading@0.8.1
	libm@0.2.8
	libredox@0.0.1
	linux-raw-sys@0.4.12
	lock_api@0.4.11
	log@0.4.20
	mach@0.3.2
	malloc_buf@0.0.6
	memchr@2.7.1
	memmap2@0.9.3
	memoffset@0.7.1
	mime@0.3.17
	miniz_oxide@0.7.1
	mio@0.8.10
	nix@0.26.4
	num-bigint-dig@0.8.4
	num-integer@0.1.45
	num-iter@0.1.43
	num-traits@0.2.17
	num_cpus@1.16.0
	objc-foundation@0.1.1
	objc@0.2.7
	objc_id@0.1.1
	object@0.32.2
	once_cell@1.19.0
	openssl-probe@0.1.5
	parking_lot@0.12.1
	parking_lot_core@0.9.9
	password-hash@0.5.0
	paste@1.0.14
	pbkdf2@0.12.2
	pem-rfc7468@0.7.0
	percent-encoding@2.3.1
	pin-project-lite@0.2.13
	pin-utils@0.1.0
	pkcs1@0.7.5
	pkcs8@0.10.2
	pkg-config@0.3.28
	polling@3.3.1
	ppv-lite86@0.2.17
	proc-macro2@1.0.73
	quick-xml@0.30.0
	quote@1.0.34
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	redox_syscall@0.4.1
	redox_users@0.4.4
	regex-automata@0.4.3
	regex-syntax@0.8.2
	regex@1.10.2
	region@3.0.0
	reqwest@0.11.23
	ring@0.17.7
	rmp@0.8.12
	rmpv@1.0.1
	rsa@0.9.6
	rustc-demangle@0.1.23
	rustix@0.38.28
	rustls-native-certs@0.6.3
	rustls-pemfile@1.0.4
	rustls-webpki@0.101.7
	rustls@0.21.10
	ryu@1.0.16
	schannel@0.1.23
	scoped-tls@1.0.1
	scopeguard@1.2.0
	sct@0.7.1
	security-framework-sys@2.9.1
	security-framework@2.9.2
	serde@1.0.193
	serde_derive@1.0.193
	serde_json@1.0.109
	serde_path_to_error@0.1.14
	serde_repr@0.1.17
	serde_urlencoded@0.7.1
	sha1@0.10.6
	sha2@0.10.8
	signal-hook-registry@1.4.1
	signature@2.2.0
	slab@0.4.9
	smallvec@1.11.2
	smawk@0.3.2
	smithay-client-toolkit@0.18.0
	smithay-clipboard@0.7.0
	socket2@0.5.5
	spin@0.5.2
	spin@0.9.8
	spki@0.7.3
	strsim@0.10.0
	subtle@2.5.0
	syn@2.0.45
	system-configuration-sys@0.5.0
	system-configuration@0.5.1
	tempfile@3.9.0
	termcolor@1.4.0
	terminal_size@0.3.0
	textwrap@0.16.0
	thiserror-impl@1.0.53
	thiserror@1.0.53
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tokio-macros@2.2.0
	tokio-rustls@0.24.1
	tokio-stream@0.1.14
	tokio-tungstenite@0.20.1
	tokio-util@0.7.10
	tokio@1.35.1
	totp-lite@2.0.1
	tower-service@0.3.2
	tracing-core@0.1.32
	tracing@0.1.40
	try-lock@0.2.5
	tungstenite@0.20.1
	typenum@1.17.0
	unicode-bidi@0.3.14
	unicode-ident@1.0.12
	unicode-linebreak@0.1.5
	unicode-normalization@0.1.22
	unicode-width@0.1.11
	untrusted@0.9.0
	url@2.5.0
	utf-8@0.7.6
	utf8parse@0.2.1
	uuid@1.6.1
	version_check@0.9.4
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.89
	wasm-bindgen-futures@0.4.39
	wasm-bindgen-macro-support@0.2.89
	wasm-bindgen-macro@0.2.89
	wasm-bindgen-shared@0.2.89
	wasm-bindgen@0.2.89
	wayland-backend@0.3.2
	wayland-client@0.31.1
	wayland-csd-frame@0.3.0
	wayland-cursor@0.31.0
	wayland-protocols-wlr@0.2.0
	wayland-protocols@0.31.0
	wayland-scanner@0.31.0
	wayland-sys@0.31.1
	web-sys@0.3.66
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.6
	winapi-wsapoll@0.1.1
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-sys@0.45.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.42.2
	windows-targets@0.48.5
	windows-targets@0.52.0
	windows_aarch64_gnullvm@0.42.2
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.0
	windows_aarch64_msvc@0.42.2
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.0
	windows_i686_gnu@0.42.2
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.0
	windows_i686_msvc@0.42.2
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.0
	windows_x86_64_gnu@0.42.2
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.0
	windows_x86_64_gnullvm@0.42.2
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.0
	windows_x86_64_msvc@0.42.2
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.0
	winreg@0.50.0
	x11-clipboard@0.8.1
	x11rb-protocol@0.12.0
	x11rb@0.12.0
	xcursor@0.3.5
	xkeysym@0.2.0
	zeroize@1.7.0
"

inherit cargo shell-completion

DESCRIPTION="Unofficial Bitwarden CLI"
HOMEPAGE="https://github.com/doy/rbw"
SRC_URI="
	https://github.com/doy/rbw/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD-2 BSD Boost-1.0 ISC MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"

QA_FLAGS_IGNORED="
	usr/bin/rbw
	usr/bin/rbw-agent
"

src_install() {
	cargo_src_install

	local rbw
	rbw="target/$(usex debug debug release)/rbw"

	"$rbw" gen-completions bash > rbw || die
	dobashcomp rbw

	"$rbw" gen-completions fish > rbw.fish || die
	dofishcomp rbw.fish

	"$rbw" gen-completions zsh > _rbw || die
	dozshcomp _rbw
}