commit: 885fb8257fb48d2c1fa80cb78645ab91e50e49b3 Author: ingenarel (NeoJesus) <ingenarel_neojesus <AT> disroot <DOT> org> AuthorDate: Sun Feb 15 06:31:15 2026 +0000 Commit: Saad Abdullah <ingenarelitems <AT> gmail <DOT> com> CommitDate: Thu Feb 26 19:35:12 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=885fb825
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 <AT> disroot.org> Part-of: https://github.com/gentoo/guru/pull/440 Closes: https://github.com/gentoo/guru/pull/440 www-plugins/tridactyl-native/Manifest | 2 + www-plugins/tridactyl-native/metadata.xml | 18 +++++++ .../tridactyl-native/tridactyl-native-0.5.0.ebuild | 59 ++++++++++++++++++++++ 3 files changed, 79 insertions(+) diff --git a/www-plugins/tridactyl-native/Manifest b/www-plugins/tridactyl-native/Manifest new file mode 100644 index 0000000000..910284b5d5 --- /dev/null +++ b/www-plugins/tridactyl-native/Manifest @@ -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 diff --git a/www-plugins/tridactyl-native/metadata.xml b/www-plugins/tridactyl-native/metadata.xml new file mode 100644 index 0000000000..ac595eae81 --- /dev/null +++ b/www-plugins/tridactyl-native/metadata.xml @@ -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>[email protected]</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> diff --git a/www-plugins/tridactyl-native/tridactyl-native-0.5.0.ebuild b/www-plugins/tridactyl-native/tridactyl-native-0.5.0.ebuild new file mode 100644 index 0000000000..60dd7b8c8f --- /dev/null +++ b/www-plugins/tridactyl-native/tridactyl-native-0.5.0.ebuild @@ -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 +}
