Install this version:
emerge -a =app-misc/yazi-9999
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =app-misc/yazi-9999
Or alternatively:
emerge --autounmask-write -a =app-misc/yazi-9999
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CRATES=" "
RUST_MIN_VER="1.95.0"
inherit cargo desktop optfeature shell-completion xdg
DESCRIPTION="Blazing fast terminal file manager written in Rust, based on async I/O"
HOMEPAGE="https://yazi-rs.github.io"
if [[ "${PV}" == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/sxyazi/yazi.git"
else
SRC_URI="https://github.com/sxyazi/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/gentoo-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz
${CARGO_CRATE_URIS}
"
KEYWORDS="~amd64 ~arm64"
fi
# both the LICENSE file and LICENSE-ICONS are MIT
LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
Apache-2.0 BSD Boost-1.0 BlueOak-1.0.0 CC0-1.0 CDLA-Permissive-2.0
ISC MIT MPL-2.0 Unicode-3.0 ZLIB
"
SLOT="0"
IUSE="+cli"
DEPEND="
dev-libs/oniguruma:=
"
# apply-crates-fixes start
DEPEND+="
>=dev-libs/jemalloc-5.3.1:=
"
BDEPEND="
virtual/pkgconfig
"
# apply-crates-fixes end
RDEPEND="
${DEPEND}
cli? ( dev-vcs/git )
"
DOCS=(
"CHANGELOG.md"
"README.md"
yazi-config/preset/
)
QA_FLAGS_IGNORED="
usr/bin/ya.*
"
src_unpack() {
if [[ "${PV}" == 9999 ]]; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_prepare() {
sed -i -r 's/strip\s+= true/strip = false/' Cargo.toml || die "Sed failed!"
eapply_user
}
src_compile() {
# apply-crates-fixes start
# unvendoring for tikv-jemalloc-sys crate
export JEMALLOC_OVERRIDE="${ESYSROOT}/usr/$(get_libdir)/libjemalloc.so"
# https://github.com/tikv/jemallocator/issues/19
export CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1
# apply-crates-fixes end
# workaround for GCC 15 issues:
# unvendor libonig from rust-onig. see bugs 943785, 945008
export RUSTONIG_SYSTEM_LIBONIG=1
# generate shell completions from the actual CLI definitions
export YAZI_GEN_COMPLETIONS=true
# silences vergen
export YAZI_NO_GITCL=1
local myargs=(
--package yazi-fm
)
use cli && myargs+=( --package yazi-cli )
cargo_src_compile "${myargs[@]}"
}
src_test() {
export RUSTONIG_SYSTEM_LIBONIG=1
cargo_src_test --workspace
}
src_install() {
dobin "$(cargo_target_dir)/${PN}"
use cli && dobin "$(cargo_target_dir)/ya"
newbashcomp "${S}/yazi-boot/completions/${PN}.bash" "${PN}"
dozshcomp "${S}/yazi-boot/completions/_${PN}"
dofishcomp "${S}/yazi-boot/completions/${PN}.fish"
if use cli; then
newbashcomp "${S}/yazi-cli/completions/ya.bash" "ya"
dozshcomp "${S}/yazi-cli/completions/_ya"
dofishcomp "${S}/yazi-cli/completions/ya.fish"
fi
domenu "assets/${PN}.desktop"
newicon assets/logo.png yazi.png
einstalldocs
}
pkg_postinst() {
xdg_pkg_postinst
optfeature "Nerd Font icons" media-fonts/symbols-nerd-font
optfeature "video thumbnails" media-video/ffmpeg
optfeature "archive extraction and preview" app-arch/7zip
optfeature "JSON preview" app-misc/jq
optfeature "PDF preview" app-text/poppler
optfeature "file searching" sys-apps/fd
optfeature "file content searching" sys-apps/ripgrep
optfeature "quick file subtree navigation" ">=app-shells/fzf-0.53.0"
optfeature "historical directory navigation" "app-shells/zoxide >=app-shells/fzf-0.53.0"
optfeature "Font, HEIC and JPEG XL preview" ">=media-gfx/imagemagick-7.1.1"
optfeature_header "Install one of these for clipboard support:"
optfeature "Wayland clipboard support" gui-apps/wl-clipboard
optfeature "X11 clipboard support" x11-misc/xclip x11-misc/xsel
}
Manage flags for this package:
euse -i <flag> -p app-misc/yazi |
euse -E <flag> -p app-misc/yazi |
euse -D <flag> -p app-misc/yazi
dev-libs/oniguruma:= >=dev-libs/jemalloc-5.3.1:=
dev-libs/oniguruma:= >=dev-libs/jemalloc-5.3.1:= cli? ( dev-vcs/git )
virtual/pkgconfig