Skip to content

New package: handy-0.10.2 - #64023

Open
fpvmorais wants to merge 1 commit into
void-linux:masterfrom
fpvmorais:handy
Open

fpvmorais wants to merge 1 commit into
void-linux:masterfrom
fpvmorais:handy

Conversation

@fpvmorais

Copy link
Copy Markdown
Contributor

Handy is a free, offline, extensible speech-to-text app (Tauri/WebKit, MIT-licensed):
https://github.com/cjpais/Handy

It is not in the Void repos, and upstream only ships AppImage/RPM assets. The RPM is
self-contained (usr/bin/handy + usr/lib/Handy/* ggml/transcribe libs + desktop file),
so this template repacks the official RPM — same approach as the existing
obs-plugin-browser-bin package.

Details:

  • archs="x86_64 aarch64" (the only arches with upstream RPMs), arch-aware distfile and checksum for each.
  • Runtime deps: libwebkit2gtk41, gtk+3, gtk-layer-shell, alsa-lib, libssl3, openblas, vulkan-loader (0.10.x bundles a
    ggml Vulkan backend).
  • LICENSE installed to /usr/share/licenses/handy/ (fetched from the release tag).
  • wtype (Wayland) or xdotool (X11) is additionally required for paste-back.

Testing the changes

  • I tested the changes in this PR: YES

New package

AI disclosure (per Void's global contributing policy): an AI coding assistant was used to draft and verify this template
and description. All changes were reviewed and are understood by the submitter.

@tranzystorekk tranzystorekk added the new-package This PR adds a new package label Dec 4, 2026
@Duncaen

Duncaen commented Dec 4, 2026

Copy link
Copy Markdown
Member

We don't really allow packaging binaries for open source software.

@slymattz

slymattz commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

I managed to build it from source and test on x86_64-glibc. Speech-to-text works fine.

I additionally cross-compiled it for aarch64-musl. I marked armv[67] arches as broken with an appropriate comment. Same goes for i686.

W/out tauri/custom-protocol feature, the binary opened up fine but complained about not being able to connect to the localhost server.

As for noshlibprovides=yes, I used it to make sure that the following libraries, which are meant for handy only, are not advertised as system-wide shared library providers.

   SONAME libggml.so.0 from /usr/lib/Handy/libggml.so.0 
   SONAME libtranscribe.so.0.4 from /usr/lib/Handy/libtranscribe.so.0.4 
   SONAME libggml-base.so.0 from /usr/lib/Handy/libggml-base.so.0

Although there is currently no SONAME conflict, this prevents potential dependency resolution issues with the standalone ggml package proposed in #63352.

@fpvmorais Can you test the following locally? I kept your email in the maintainer line.

# Template file for 'handy'
pkgname=handy
version=0.10.2
revision=1
build_helper="rust"
hostmakedepends="cargo nodejs jq pkg-config cmake shaderc"
makedepends="libX11-devel libXi-devel libXtst-devel dbus-devel libglib-devel atk-devel cairo-devel pango-devel gtk+3-devel
 libwebkit2gtk41-devel alsa-lib-devel Vulkan-Headers vulkan-loader-devel SPIRV-Headers gtk-layer-shell-devel rust-std"
depends="libayatana-appindicator"
short_desc="Free, offline and extensible speech-to-text app (Tauri/WebKit)"
maintainer="Lobo <fpvmorais@gmail.com>"
license="MIT"
homepage="https://github.com/cjpais/Handy"
changelog="https://github.com/cjpais/Handy/releases"
distfiles="https://github.com/cjpais/Handy/archive/refs/tags/v${version}.tar.gz"
checksum=9cc52dcbd16e6c4a71855b435b1196fb6a5da394c7d23aac81b33e31dd3ea69b
noshlibprovides=yes

case "$XBPS_TARGET_MACHINE" in
	armv[67]l*)
		# error: inlining failed in call to 'always_inline' 'vshrn_n_s64': target specific option mismatch
		broken="NEON SIMD incompatibility in opusic-sys"
		;;
	i686*)
		# error: Your current platform "linux" and architecture "ia32" combination is not yet supported by the native Rollup build
		broken="native Rollup builds not supported on i686"
		;;
esac

post_patch() {
	# remove the bun-dependent postinstall script to allow building with npm
	jq 'del(.scripts.postinstall)' \
		package.json > package.json.tmp && mv package.json.tmp package.json
}

pre_build() {
	npm install --include=dev
	cargo fetch --manifest-path src-tauri/Cargo.toml --locked
}

do_build() {
	npm run build
	cargo build --manifest-path src-tauri/Cargo.toml \
		--target "${RUST_TARGET}" --release --frozen --features "tauri/custom-protocol"
}

do_install() {
	vbin "src-tauri/target/${RUST_TARGET}/release/handy"
	vmkdir usr/lib/Handy/resources
	vcopy "src-tauri/resources/*" usr/lib/Handy/resources
	vcopy "src-tauri/transcribe-libs/*" usr/lib/Handy

	# there is no .desktop file shipped by upstream, so vendor it
	cat > handy.desktop <<-EOF
		[Desktop Entry]
		Name=Handy
		Comment=Offline speech-to-text application
		Exec=handy
		Icon=handy
		Terminal=false
		Type=Application
		Categories=Utility;Accessibility;
		StartupNotify=true
	EOF

	vinstall handy.desktop 644 usr/share/applications
	vinstall src-tauri/icons/32x32.png 644 usr/share/icons/hicolor/32x32/apps handy.png
	vinstall src-tauri/icons/128x128.png 644 usr/share/icons/hicolor/128x128/apps handy.png
	vinstall src-tauri/icons/128x128@2x.png 644 usr/share/icons/hicolor/256x256/apps handy.png
}

post_install() {
	vlicense LICENSE
}

Template provided by @slymattz in void-linux#64023; builds Handy from source
(npm frontend + cargo Tauri backend with tauri/custom-protocol). The
prebuilt ggml/transcribe libraries shipped in the upstream source
tarball are installed to /usr/lib/Handy with noshlibprovides=yes.

Tested on x86_64-glibc: GUI instance, headless --list-devices /
--list-models, and end-to-end transcription (whisper-base.en-Q8_0 on
Vulkan/RX 6750 XT, ~10.8x realtime).
@fpvmorais

Copy link
Copy Markdown
Contributor Author

Thanks @slymattz! Tested locally on x86_64-glibc (Ryzen 7 7700X, RX 6750 XT): clean build, package contents and noshlibprovides check out, GUI starts (no localhost-server errors with tauri/custom-protocol), --list-devices shows 4 compute devices, and I transcribed a 4s WAV end-to-end with whisper-base.en-Q8_0 on Vulkan (~376ms, ~10.8× realtime). I've rewritten the PR branch as a single "New package: handy-0.10.2" commit with your template (credited in the commit message) — thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package This PR adds a new package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants