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

153.8. taskwarrior-3.5.0

Tasks with dates, dependencies and a query language

Version 3.5.0, release 1
Shelf pim — Personal information: calendars, contacts, tasks, time tracking, notes and genealogy
Phase 41_system (System), 853 of 1047 in build order
Licence MIT
Homepage https://taskwarrior.org/
Build time 7.2 SBU
Installed size 26.8 MiB in 80 files
Recipe ports/core/pim/taskwarrior/kpkgbuild

About

Taskwarrior keeps a list of tasks, with due dates, priorities, projects, tags and dependencies, and queries it from the command line with task. It is C++, but its storage layer is the Rust crate taskchampion, bridged with cxx, so the port carries a Rust vendor bundle and CMake builds the Rust half through corrosion. taskwarrior-tui is its interactive view.

Why it is in KDOS

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

3.x moved its storage layer to a Rust crate, which is why a C++ program has a cargo vendor bundle. Sync needs a server and is off by construction.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, rust, util-linux, corrosion, sqlite.

Required by (1): taskwarrior-tui.

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 taskwarrior'

What kpkg does

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

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/pim/taskwarrior
echo '9ea64b411f8314414f440ec765dfdf5a86c9f6159df47e2f60cff3db6b31157a  taskwarrior-3.5.0.tar.gz' | sha256sum -c -
echo '09b0766528db061730af57a65a05187c0a51d44d14789e29020fe60d71f9c4ad  taskwarrior-vendor-3.5.0.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/taskwarrior
SRC=$SRC_ROOT/taskwarrior-3.5.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf taskwarrior-3.5.0.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:

export LDFLAGS="$LDFLAGS -Wl,--strip-debug"

tar xf $PORT_SRC/${name}-vendor-${version}.tar.xz
export CARGO_HOME="$SRC_ROOT/.cargo"
export RUSTFLAGS="-C target-feature=-crt-static"
export CARGO_NET_OFFLINE=true

export LIBSQLITE3_SYS_USE_PKG_CONFIG=1

cp -r vendor/cxxbridge-cmd "$SRC_ROOT/cxxbridge-cmd"
cp Cargo.lock "$SRC_ROOT/cxxbridge-cmd/Cargo.lock"
cargo install --path "$SRC_ROOT/cxxbridge-cmd" --offline \
	--root "$SRC_ROOT/cxxbridge" \
	--config "source.crates-io.replace-with='vendored-sources'" \
	--config "source.vendored-sources.directory='$SRC/vendor'"

mkdir -p build && cd build
cmake .. -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DENABLE_WASM=OFF \
	-DSYSTEM_CORROSION=ON \
	-DCMAKE_CXX_STANDARD_LIBRARIES=-lsqlite3 \
	-DINSTALLED_CXXBRIDGE="$SRC_ROOT/cxxbridge/bin/cxxbridge"
ninja
DESTDIR=$PKG ninja install
cd ..

install -Dm644 scripts/bash/task.sh "$PKG/usr/share/bash-completion/completions/task"

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

Contents

Installed programs: task.

Installed directories: /usr/share/doc/task, /usr/share/licenses/taskwarrior.

Short descriptions

task A command line todo manager.

Notes

Upstream’s install puts the fish and zsh completions where those shells look, but the bash one only among the documentation’s scripts, so build.sh installs scripts/bash/task.sh as /usr/share/bash-completion/completions/task itself.