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

111.1. iamb-0.0.12

Terminal Matrix client with vim key bindings

Version 0.0.12, release 1
Shelf chat — Instant messaging, IRC, XMPP, Matrix, fediverse and voice clients, with their protocol and E2E libraries
Phase 41_system (System), 251 of 1047 in build order
Licence Apache-2.0
Homepage https://iamb.chat/
Build time 16.3 SBU
Installed size 77.6 MiB in 5 files
Recipe ports/core/chat/iamb/kpkgbuild

About

iamb is a Matrix chat client for the terminal, with vim’s keys: rooms, spaces and threads, end-to-end encryption, reactions and edits, and image previews (as pictures in a terminal that can show them, as coloured blocks in one that cannot), all through the Rust Matrix SDK. The port installs the program, its two manual pages, iamb(1) and the configuration page iamb(5), and a desktop entry that opens it in a terminal as Matrix. The entry is NoDisplay=true: until ~/.config/iamb/config.toml names an account iamb exits asking for one, so it is started from a prompt.

Why it is in KDOS

The comment above it in script/phases/41_system/packages.d/chat.txt:

MATRIX, WITH vim'S KEYS. SQLite is bundled because every rust port here is a static-pie binary and none of them can reach the shared libsqlite3 the image carries; TLS is rustls for the same reason pizauth's is.

Sources

Dependencies

Depends on: rust, sqlite.

Required by: no port names it.

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/41_system/phase.env && kpkg install iamb'

What kpkg does

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

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/iamb
echo '54e3e87eece1aff22e9d6bd6798492a1d23ea5e831e9d0889b51272c7d4f6cdb  iamb-0.0.12.tar.gz' | sha256sum -c -
echo '6934e4094c372c9513e11203046533e78d878eb338c649e13437c65dc9a06395  iamb-vendor-0.0.12.tar.xz' | 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/iamb
SRC=$SRC_ROOT/iamb-0.0.12
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf iamb-0.0.12.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:

tar xf $PORT_SRC/${name}-vendor-${version}.tar.xz

export RUSTFLAGS="-C target-feature=-crt-static"
cargo build --release --frozen --offline
readelf -d target/release/iamb | grep -q 'NEEDED.*\[libsqlite3\.so\.0\]'

install -Dm755 target/release/iamb $PKG/usr/bin/iamb
install -Dm644 docs/iamb.1 -t "$PKG/usr/share/man/man1"
install -Dm644 docs/iamb.5 -t "$PKG/usr/share/man/man5"

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/iamb.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=Matrix
GenericName=Chat
Comment=Matrix chat with vim's keys
Exec=iamb
Icon=mail-message
Terminal=true
NoDisplay=true
Categories=Network;InstantMessaging;
Keywords=chat;matrix;im;message;iamb;
EOF
chmod 644 "$PKG/usr/share/applications/iamb.desktop"

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/iamb, 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 iamb-0.0.12-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/iamb, and runs the triggers its paths call for.

Contents

Installed programs: iamb.

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

Short descriptions

iamb a terminal-based client for Matrix for the Vim addict

Notes

iamb is a Rust program built from a vendor bundle, iamb-vendor-<version>.tar.xz, which ports/fetch makes with cargo vendor and the recipe pins by its sha256; see Vendoring and the rust build shape.

The Matrix SDK keeps its state in SQLite through libsqlite3-sys, which the tree’s environment points at the system library. build.sh checks that the binary NEEDs libsqlite3.so.0 after cargo build, so a crate that falls back to compiling its own SQLite stops the build instead of shipping a private copy.

TLS has no such switch. The SDK uses rustls with its default provider, AWS-LC, which aws-lc-sys compiles into the binary. That copy has a row in src/system/kdos-tools/secdb/bundled.txt, so kdos cve still sees its version; see Bundled copies. A version bump that moves aws-lc-sys changes that row too.