summaryrefslogtreecommitdiff
path: root/app-misc/navi/navi-9999.ebuild
blob: 2d88a4ca376a4357cfb0502ebf6f4563883f53f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.15.0

EAPI=8

CRATES="
	aho-corasick@1.1.3
	aligned@0.4.2
	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.95
	as-slice@0.2.1
	autocfg@1.4.0
	bitflags@2.8.0
	cfg-if@1.0.0
	cfg_aliases@0.2.1
	clap@4.5.26
	clap_builder@4.5.26
	clap_derive@4.5.24
	clap_lex@0.7.4
	colorchoice@1.0.3
	crossterm@0.28.1
	crossterm_winapi@0.9.1
	cvt@0.1.2
	directories-next@2.0.0
	dirs-sys-next@0.1.2
	dns_common@0.2.1
	dns_common_derive@0.2.1
	dunce@1.0.5
	edit@0.1.5
	either@1.13.0
	equivalent@1.0.1
	errno@0.3.10
	etcetera@0.8.0
	fastrand@2.3.0
	fs_at@0.2.1
	getrandom@0.2.15
	hashbrown@0.15.2
	heck@0.5.0
	home@0.5.11
	indexmap@2.7.0
	is_terminal_polyfill@1.70.1
	itoa@1.0.14
	lazy_static@1.5.0
	libc@0.2.169
	libredox@0.1.3
	linux-raw-sys@0.4.15
	lock_api@0.4.12
	log@0.4.25
	matchers@0.1.0
	memchr@2.7.4
	mio@1.0.3
	nix@0.29.0
	normpath@1.3.0
	nu-ansi-term@0.46.0
	once_cell@1.20.2
	overload@0.1.1
	parking_lot@0.12.3
	parking_lot_core@0.9.10
	pin-project-lite@0.2.16
	proc-macro2@1.0.93
	quote@1.0.38
	redox_syscall@0.5.8
	redox_users@0.4.6
	regex-automata@0.1.10
	regex-automata@0.4.9
	regex-syntax@0.6.29
	regex-syntax@0.8.5
	regex@1.11.1
	remove_dir_all@1.0.0
	rustix@0.38.43
	ryu@1.0.18
	same-file@1.0.6
	scopeguard@1.2.0
	serde@1.0.217
	serde_derive@1.0.217
	serde_json@1.0.135
	serde_yaml@0.9.34+deprecated
	sharded-slab@0.1.7
	shellwords@1.1.0
	signal-hook-mio@0.2.4
	signal-hook-registry@1.4.2
	signal-hook@0.3.17
	smallvec@1.13.2
	stable_deref_trait@1.2.0
	strip-ansi-escapes@0.2.1
	strsim@0.11.1
	syn@1.0.109
	syn@2.0.96
	synstructure@0.12.6
	tempfile@3.15.0
	thiserror-impl@1.0.69
	thiserror-impl@2.0.11
	thiserror@1.0.69
	thiserror@2.0.11
	thread_local@1.1.8
	tracing-attributes@0.1.28
	tracing-core@0.1.33
	tracing-log@0.2.0
	tracing-subscriber@0.3.19
	tracing@0.1.41
	unicode-ident@1.0.14
	unicode-width@0.2.0
	unicode-xid@0.2.6
	unsafe-libyaml@0.2.11
	utf8parse@0.2.2
	valuable@0.1.1
	vte@0.14.1
	walkdir@2.5.0
	wasi@0.11.0+wasi-snapshot-preview1
	which@4.4.2
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.9
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-sys@0.59.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
"

inherit cargo edo

DESCRIPTION="An interactive cheatsheet tool for the command-line"
HOMEPAGE="https://github.com/denisidoro/navi"

if [[ "${PV}" == "9999" ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/denisidoro/navi.git"
else
	SRC_URI="
		https://github.com/denisidoro/navi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
		${CARGO_CRATE_URIS}
	"

	KEYWORDS="~amd64"
fi

LICENSE="Apache-2.0"

# Dependent crate licenses
LICENSE+=" Apache-2.0 CC0-1.0 MIT Unicode-3.0"

SLOT="0"
IUSE="+command-execution +repo-management test"
REQUIRED_USE="test? ( command-execution )"
RESTRICT="!test? ( test )"

DOCS=(
	assets/
	docs/
	README.md
)

PATCHES=(
	"${FILESDIR}/${PN}-remove-bash-tests-needing-internet-connection.patch"
)

BDEPEND="test? ( app-misc/tmux app-shells/fzf )"
RDEPEND="|| ( app-shells/fzf app-misc/skim )"

src_unpack() {
	if [[ "${PV}" == "9999" ]]; then
		git-r3_src_unpack
		cargo_live_src_unpack
	else
		cargo_src_unpack
	fi
}

src_prepare() {
	default
	sed -i "s|target/debug|$(cargo_target_dir)|" tests/run || die
}

src_configure() {
	local -a myfeatures

	use command-execution || myfeatures+=( "disable-command-execution" )
	use repo-management || myfeatures+=( "disable-repo-management" )

	cargo_src_configure
}

src_test() {
	mkdir "${T}/cheat-dir" || die
	touch "${T}/config-file" || die
	NAVI_CONFIG="${T}/config-file" NAVI_PATH="${T}/cheat-dir" cargo_src_test

	cargo_src_test
	edob -m "Running Bash tests" tests/run
}

src_install() {
	cargo_src_install
	einstalldocs
}