www-plugins/tridactyl-native - 0.5.0 (guru)

Search

Install

Install this version:

emerge -a =www-plugins/tridactyl-native-0.5.0

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

autounmask =www-plugins/tridactyl-native-0.5.0

Or alternatively:

emerge --autounmask-write -a =www-plugins/tridactyl-native-0.5.0

Package Information

Description:
Native messenger for Tridactyl, a vim-like web-extension
Homepage:
https://github.com/tridactyl/native_messenger
License:
BSD-2

Ebuild Details

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

EAPI=8

inherit nim-utils

# inherit nimble
# simply isn't working for this package's use case
# need to probably rewrite another whole nimble eclass sooner or later
# also the eclass uses nimbus instead of the official nim package manager nimble
DESCRIPTION="Native messenger for Tridactyl, a vim-like web-extension"
HOMEPAGE="https://github.com/tridactyl/native_messenger"
SRC_URI="
	https://github.com/tridactyl/native_messenger/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	https://github.com/ingenarel/guru-depfiles/releases/download/${P}-deps.tar.xz/${P}-deps.tar.xz
"
# use these commands to generate the deps
# nimble build --localdeps
# find nimbledeps -exec file --mime-type {} \; |
# sed -nE 's/^(.+): (text\/\S+|application\/json)$/\1/p' |
# xargs tar --create --verbose --file nimbledeps.tar.xz
S="${WORKDIR}/native_messenger-${PV}"

LICENSE="BSD-2"

SLOT="0"

KEYWORDS="~amd64"

BDEPEND="dev-lang/nim"

src_configure(){
	nim_gen_config
}

src_compile() {
	nimble\
		--verbose\
		--offline\
		--localDeps\
		--nimbleDir:"${WORKDIR}/nimbledeps"\
		--useSystemNim\
		build ||
	die "build failed!"
}

src_install() {
	exeinto /usr/libexec/tridactyl
	doexe native_main
	sed -i -e "s|REPLACE_ME_WITH_SED|${EPREFIX}/usr/libexec/tridactyl/native_main|" ./tridactyl.json ||
	die "trying to sed installation path in tridactyl.json failed!"
	local target_dirs=( /usr/{lib,$(get_libdir)}/mozilla/native-messaging-hosts )
	local target_dir
	for target_dir in "${target_dirs[@]}"; do
		insinto "${target_dir}"
		doins tridactyl.json
	done
}

Inherited Eclasses

Dependencies

BDEPEND

dev-lang/nim

Manifest for 0.5.0

Type File Size Source URLs
DIST tridactyl-native-0.5.0-deps.tar.xz 7311360 bytes https://github.com/ingenarel/guru-depfiles/releases/download/tridactyl-native-0.5.0-deps.tar.xz/tridactyl-native-0.5.0-deps.tar.xz
DIST tridactyl-native-0.5.0.tar.gz 91457 bytes https://github.com/tridactyl/native_messenger/archive/refs/tags/0.5.0.tar.gz