Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

302.4. nheko-0.12.1

Matrix chat client (Qt 6) — rooms, end-to-end encryption, voice and video calls

Version 0.12.1, release 1
Shelf chat — Instant messaging, IRC, XMPP, Matrix, fediverse and voice clients, with their protocol and E2E libraries
Phase 44_apps (Applications), 31 of 422 in build order
Licence GPL-3.0-or-later
Homepage https://nheko-reborn.github.io/
Build time 10.6 SBU
Installed size 25.1 MiB in 14 files
Recipe ports/core/chat/nheko/kpkgbuild

About

Nheko is a desktop client for Matrix, written in C++ with a Qt 6 Quick interface: rooms and direct chats, end-to-end encryption with device verification, and voice and video calls. The Matrix protocol itself is mtxclient, the library from the same project, and the encryption is olm.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, asciidoctor, qt6-qtbase, qt6-qtdeclarative, qt6-qtmultimedia, qt6-qtsvg, qt6-qttools, qt6-qtimageformats, qt6-qtwayland, qtkeychain, kdsingleapplication, mtxclient, coeurl, olm, spdlog, fmt, lmdb, lmdbxx, cmark, nlohmann-json, re2, openssl, libevent, curl, zlib, gstreamer, gst-plugins-base, gst-plugins-good, gst-plugins-bad, libnice, hicolor-icon-theme.

Required by: no port names it.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install nheko'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/chat/nheko.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/chat/nheko
echo '81cc613ee2420b1289c9cc7aeee81cae69a153971fd3112225e48d1c7b224ea5  nheko-0.12.1.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/nheko
SRC=$SRC_ROOT/nheko-0.12.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf nheko-0.12.1.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/qt6.10-private-modules.patch"
patch -p1 -i "$PORT_SRC/fix-reply.patch"

export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576"
cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D CMAKE_SKIP_RPATH=ON \
	-D HUNTER_ENABLED=OFF \
	-D USE_BUNDLED_CPPHTTPLIB=ON \
	-D USE_BUNDLED_BLURHASH=ON \
	-D VOIP=ON \
	-D SCREENSHARE_XDP=ON \
	-D X11=OFF \
	-D MAN=ON \
	-D CI_BUILD=OFF \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/nheko, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf nheko-0.12.1-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/nheko, and runs the triggers its paths call for.

Contents

Installed programs: nheko.

Installed directories: /usr/share/licenses/nheko.

Short descriptions

nheko Desktop client for Matrix using Qt and C++17

Notes

Both patches are upstream commits and carry their own descriptions. One makes the CMake build find the private Qt modules nheko links, which Qt from 6.10 on has to be asked for by name (GuiPrivate, QmlPrivate); the other repairs how replies are drawn in the timeline from Qt 6.9.2 on.