gui-apps/espanso - 2.3.0 (guru)

Search

Install

Install this version:

emerge -a =gui-apps/espanso-2.3.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =gui-apps/espanso-2.3.0

Or alternatively:

emerge --autounmask-write -a =gui-apps/espanso-2.3.0

Package Information

Description:
Cross-platform Text Expander written in Rust
Homepage:
https://espanso.org
License:
GPL-3 Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 ZLIB

Ebuild Details

Version EAPI Keywords Slot
2.3.0 8 ~amd64 0
View Raw Ebuild
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

RUST_MIN_VER="1.77.0"

inherit cargo desktop fcaps linux-info systemd xdg

DESCRIPTION="Cross-platform Text Expander written in Rust"
HOMEPAGE="https://espanso.org"
SRC_URI="https://github.com/espanso/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
DEPS_URI="https://github.com/freijon/${PN}/releases/download/v${PV}/${P}-crates.tar.xz"
SRC_URI+=" ${DEPS_URI}"

LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 ZLIB"
SLOT="0"
KEYWORDS="~amd64"
IUSE="wayland"

DEPEND="
	acct-group/input
	dev-libs/openssl
	sys-apps/dbus
	x11-libs/wxGTK
	wayland? (
		x11-libs/libxkbcommon[wayland]
	)
	!wayland? (
		x11-libs/libX11
		x11-libs/libxcb
		x11-libs/libXtst
		x11-libs/libxkbcommon[X]
	)
"
RDEPEND="${DEPEND}"

QA_FLAGS_IGNORED="usr/bin/${PN}"

pkg_setup() {
	CONFIG_CHECK="~INPUT_UINPUT"
	ERROR_INPUT_UINPUT="Espanso with Wayland needs the UINPUT"
	ERROR_INPUT_UINPUT+=" input device driver to detect user inputs. Without it,"
	ERROR_INPUT_UINPUT+=" Espanso will not work as intended"

	# Now do the actual checks setup above, but only when using wayland
	use wayland && linux-info_pkg_setup
	rust_pkg_setup
}

src_configure() {
	local myfeatures=(
		modulo
		native-tls
		$(usev wayland)
	)
	cargo_src_configure --verbose --no-default-features
}

src_compile() {
	cargo_src_compile -p "${PN}"
}

src_install() {
	cargo_src_install --path "${PN}"

	newicon -s 128 "espanso/src/res/linux/icon.png" "${PN}.png"
	domenu "espanso/src/res/linux/${PN}.desktop"

	# install the systemd-service (user level)
	sed -i "s|{{{espanso_path}}}|/usr/bin/espanso|g" "espanso/src/res/linux/systemd.service" || die
	systemd_newuserunit "espanso/src/res/linux/systemd.service" "${PN}.service"
}

pkg_postinst() {
	# See https://espanso.org/docs/install/linux/#adding-the-required-capabilities
	use wayland && fcaps cap_dac_override "usr/bin/${PN}"
}

USE Flags

Manage flags for this package: euse -i <flag> -p gui-apps/espanso | euse -E <flag> -p gui-apps/espanso | euse -D <flag> -p gui-apps/espanso

Global/Standard Flags

Inherited Eclasses

xdg

Dependencies

DEPEND

	acct-group/input
	dev-libs/openssl
	sys-apps/dbus
	x11-libs/wxGTK
	wayland? (
		x11-libs/libxkbcommon[wayland]
	)
	!wayland? (
		x11-libs/libX11
		x11-libs/libxcb
		x11-libs/libXtst
		x11-libs/libxkbcommon[X]
	)

RDEPEND

	acct-group/input
	dev-libs/openssl
	sys-apps/dbus
	x11-libs/wxGTK
	wayland? (
		x11-libs/libxkbcommon[wayland]
	)
	!wayland? (
		x11-libs/libX11
		x11-libs/libxcb
		x11-libs/libXtst
		x11-libs/libxkbcommon[X]
	)

Manifest for 2.3.0

Type File Size Source URLs
DIST espanso-2.3.0-crates.tar.xz 35737972 bytes https://github.com/freijon/espanso/releases/download/v2.3.0/espanso-2.3.0-crates.tar.xz
DIST espanso-2.3.0.tar.gz 71749236 bytes https://github.com/espanso/espanso/archive/refs/tags/v2.3.0.tar.gz