summaryrefslogtreecommitdiff
path: root/dev-util/mise/mise-2026.10.19.ebuild
blob: 7d9a1b882e19aca4b3c79a9d10fe329a13090254 (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
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CRATES=" "
RUST_MIN_VER="1.95"
inherit cargo

DESCRIPTION="The front-end to your dev env"
HOMEPAGE="https://mise.jdx.dev"
SRC_URI="https://github.com/jdx/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://share.terinstock.com/${P}-vendor.tar.xz "

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 BSD-2 BSD CDLA-Permissive-2.0 ISC MIT MPL-2.0 openssl
	Unicode-3.0 ZLIB BZIP2
"
SLOT="0"
KEYWORDS="~amd64"

BDEPEND="virtual/pkgconfig"
RDEPEND="
	dev-libs/openssl:=
	app-arch/zstd:=
	dev-lang/lua:5.1
"
DEPEND="${RDEPEND}"

src_unpack() {
	cargo_src_unpack
	ln -s "${WORKDIR}/vendor/"* "${CARGO_HOME}/gentoo/" || die
}

src_configure() {
	cargo_gen_config
	cargo_src_configure --locked --no-default-features --features native-tls --bin mise
}

src_prepare() {
	default

	export PKG_CONFIG_ALLOW_CROSS=1
	export OPENSSL_NO_VENDOR=1
	export ZSTD_SYS_USE_PKG_CONFIG=1
}

src_install() {
	dobin "$(cargo_target_dir)/${PN}"

	doman man/man1/mise.1

	# Disable self-update functionality
	insinto /usr/lib/mise
	doins "${FILESDIR}"/mise-self-update-instructions.toml

	# Enable paranoid mode system-wide
	insinto /etc/mise
	doins "${FILESDIR}"/config.toml
}