www-plugins/tridactyl-native: new package, add 0.5.0

edited slightly from the original PR by breaking up line 9 which was 120
chars

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
Part-of: https://github.com/gentoo/guru/pull/440
Closes: https://github.com/gentoo/guru/pull/440
This commit is contained in:
ingenarel (NeoJesus)
2026-02-15 12:31:15 +06:00
parent 3048e9e8e5
commit 885fb8257f
3 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST tridactyl-native-0.5.0-deps.tar.xz 7311360 BLAKE2B 179bd93f134093935d6d1e66c4e15ee5fb9d9e90c7baaa3a4eb04877074593d924dab9dce5513e1e09b2021f98aa17e77a3c658875c454d3af30b429b11ac87a SHA512 59acbd48a41be8b4b1c73de7b10efc20ae4545496f7867b6f04eeb1490ac49eb070e0b6ef8882a1d0bf0b8fbfda0d44a92b528f2778bc7640b4b8b6148d94aca
DIST tridactyl-native-0.5.0.tar.gz 91457 BLAKE2B cc9a3b2b473f4a61f8b071a235bfc1fa7b48194c15e90b8c8fb6250f8a3b5559eeb73f312fdadf2c1cb2f64bfcd77b5201cce6329832e539742d7b059ade00c9 SHA512 90c30a6769723985b350f7e68dbfcfb3d447b555c24196384ce1bc40fdee294c88399ebd04fc08d6426a2cc1313148bb247ea7bd9d8d1eff7a8d178e57653caf

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ingenarel_neojesus@disroot.org</email>
<name>ingenarel</name>
</maintainer>
<longdescription>
This small application allows Tridactyl to communicate with your system, allowing Tridactyl to read files on your
computer, including "RC" configuration files; write files to your computer launch applications, including opening
about:* tabs in Firefox and generally do arbitrary stuff in userspace. It therefore greatly increases the amount of
damage bugs in Tridactyl can do to your machine, although, arguably, not to your life, since almost all of that is
on the internet anyway.
</longdescription>
<upstream>
<remote-id type="github">tridactyl/native_messenger</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,59 @@
# 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
}