branch='trunk'
if ! command -v git >/dev/null 2>&1; then
echo 'byggsteg: git is not on this deployment PATH, so the clone cannot be updated' >&2
exit 1
fi
if ! cd "$dir"; then
echo "byggsteg: cannot enter the clone $dir" >&2
exit 1
fi
root=$(git rev-parse --show-toplevel 2>/dev/null)
if [ "$root" != "$(pwd -P)" ]; then
echo "byggsteg: $dir is not a git checkout; remove it and the next run clones it again" >&2
exit 1
fi
if ! origin=$(git remote get-url origin 2>/dev/null); then
echo "byggsteg: $dir has no origin remote to fetch $branch from" >&2
exit 1
fi
before=$(git rev-parse --short HEAD 2>/dev/null) || before=none
attempt=1
while :; do
if GIT_TERMINAL_PROMPT=0 git fetch --quiet origin "+refs/heads/$branch:refs/remotes/origin/$branch"; then
break
fi
if [ "$attempt" -ge 3 ]; then
echo "byggsteg: could not fetch $branch from $origin after 3 attempts; is the branch still there, and is the remote reachable?" >&2
exit 1
fi
echo "byggsteg: fetching $branch from $origin failed; retrying in $((attempt * 2))s" >&2
sleep $((attempt * 2))
attempt=$((attempt + 1))
done
if ! git checkout --quiet --force -B "$branch" FETCH_HEAD; then
echo "byggsteg: fetched $branch from $origin but could not check it out" >&2
exit 1
fi
after=$(git rev-parse --short HEAD)
if [ "$before" = "$after" ]; then
echo "byggsteg: $branch was already at $after"
else
echo "byggsteg: $branch moved from $before to $after"
fi
byggsteg: trunk moved from 7db08eb to 9f10726
setupuname -a✓ succeeded1 lines · 0.0s
Linux wolk-jjba 7.2.11-gnu #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux
commit 9f10726605724fc3781e243977308c52e4f2ca51
Author: Josep Bigorra <jjbigorra@gmail.com>
Date: Mon Nov 16 17:33:28 2026 +0100
build: a Makefile over cargo, and no C left anywhere
Meson is gone. `make` runs `cargo build --release`, and the two sources the C
half used to bring to the link are generated by `rust/build.rs` and passed to the
linker as objects -- the GResource bundle and the Wayland protocol interfaces.
Passing them as objects rather than an archive is what keeps the resource
constructor alive; the first cargo-built binary ran with no CSS and said so in
one Gtk warning.
`make test` is the suite, `make check` adds clippy and the Scheme tests, `make
install` places the binary with the desktop entry, the AppStream metainfo, the
logo, the Scheme modules and the compiled catalogues, `make i18n` refreshes and
compiles the translations, `make dist` writes the source archive. Every step is a
program with arguments; nothing is assembled out of data.
`src/` is deleted: no C source, no headers, no C test binaries. The assertions
those suites carried are `#[cfg(test)]` modules beside the code (312 tests, all
display-free, which is what lets the suite run in a sandbox). The widget
behaviour they drove through the real ABI -- a dock's layout against a live
monitor, the preferences form driven by key, the launchpad's focus, the
drag-and-drop index -- has no automated coverage today; it was verified by
running the dock, and porting it as display-gated tests is written down as the
open work in HACKING.org.
Verified: `cargo build --release` and the binary runs (25 items, no criticals,
clean quit through the D-Bus action); `cargo test` 312 passed; `cargo clippy
--all-targets` clean.
A Makefile
M README.org
D meson.build
D rust/cargo-build.sh
D src/accessibility.h
D src/app_window.h
D src/core/clock_face.h
D src/core/config_values.h
D src/core/dock_click.h
D src/core/dock_dims.h
D src/core/dock_motion.h
D src/core/item_text.h
D src/core/poll_budget.h
D src/core/poof.h
D src/core/render_stats.h
D src/core/shelf_params.h
D src/core/tracker_rules.h
D src/core/x11_rules.h
D src/dock_registry.h
D src/dock_window.h
D src/guile_bridge.h
D src/lambdock.h
D src/logger.h
D src/main.c
D src/toplevel_tracker.h
D src/ui/app_actions.h
D src/ui/clock.h
D src/ui/desktop_entry.h
D src/ui/dock_dnd.h
D src/ui/dock_item.h
D src/ui/dock_item_windows.h
D src/ui/icon_resolver.h
D src/ui/icon_zoom.h
D src/ui/launchpad.h
D src/ui/meter.h
D src/ui/poof.h
D src/ui/popover_menu.h
D src/ui/preferences.h
D src/ui/shelf.h
D src/ui/shelf_follow.h
D src/ui/stack.h
D src/ui/theme_engine.h
D src/ui/trash.h
D src/ui/widget_utils.h
D src/x11_tracker.h
D tests/run_scheme_tests.sh
D tests/scheme/lambdock_tests.scm
D tests/test_accessibility.c
D tests/test_app_actions.c
D tests/test_clock.c
D tests/test_clock_face.c
D tests/test_config_startup.c
D tests/test_config_values.c
D tests/test_desktop_entry.c
D tests/test_dock_click.c
D tests/test_dock_dims.c
D tests/test_dock_dnd.c
D tests/test_dock_item.c
D tests/test_dock_motion.c
D tests/test_dock_registry.c
D tests/test_dock_window.c
D tests/test_guile_bridge.c
D tests/test_icon_resolver.c
D tests/test_icon_zoom.c
D tests/test_item_text.c
D tests/test_launchpad.c
D tests/test_meter.c
D tests/test_poll_budget.c
D tests/test_poof.c
D tests/test_poof_widget.c
D tests/test_popover_menu.c
D tests/test_preferences.c
D tests/test_render_budget.c
D tests/test_shelf.c
D tests/test_stack.c
D tests/test_stubs.c
D tests/test_theme_engine.c
D tests/test_tracker_rules.c
D tests/test_trash.c
D tests/test_x11_dock.c
D tests/test_x11_rules.c
D tests/xdg-config/README
D tests/xdg-config/gtk-3.0/settings.ini
D tests/xdg-config/gtk-4.0/settings.ini
testmaak test✗ failed26 lines · 0.9s
ERROR: Neither source directory 'build' nor build directory None contain a build file meson.build.
maak: error: command failed (exit code 1): guix time-machine --channels=channels.scm -- shell -m manifest.scm -- /bin/sh -c 'set -eu; export GTK_A11Y=test GDK_BACKEND=x11 GSK_RENDERER=cairo; rm -rf build; meson setup build; ninja -C build; xvfb-run -a -s "-screen 0 1024x768x24" meson test -C build --print-errorlogs'
hint: Fix the command above, or run `maak --dry-run' to inspect it first.
--------------------------------------------------------------
Maak 0.14.0: the infinitely extensible command runner
Loading tasks from Maak file: /etc/byggsteg/job-clone/lambdock/trunk/maak.scm
Executing Maak tasks: test
--------------------------------------------------------------
=> Running Maak task: test
Build and run the whole test suite headlessly.
The shell wrapper only applies to the first command, so the pipeline is run by
one inner `sh -c' instead of a bare `&&': otherwise `ninja' would execute
outside the Guix environment.
The GTK tests need a display: with none, `gtk_init_check' fails and GLib turns
the resulting GTK warnings into aborts (6 of 7 tests die with SIGTRAP), so the
suite runs on a virtual X server, as in package.nix's checkPhase.`GDK_BACKEND', `GTK_A11Y' and `GSK_RENDERER' are pinned because there is no compositor, no a11y
bus and no EGL under Xvfb; `GTK_A11Y=test' is GTK's own backend for the
accessible-name assertions in the suite.
The build directory is thrown away first: the Byggsteg job clone survives
between jobs, and a tree configured by a different Meson version makes both
`meson setup' and `ninja' fail with 'build data file ... references functions
or classes that don't exist'. Rebuilding from scratch also means the passing
tests are the ones that match the checked out sources.
Execute command:
guix time-machine --channels=channels.scm -- shell -m manifest.scm -- /bin/sh -c 'set -eu; export GTK_A11Y=test GDK_BACKEND=x11 GSK_RENDERER=cairo; rm -rf build; meson setup build; ninja -C build; xvfb-run -a -s "-screen 0 1024x768x24" meson test -C build --print-errorlogs'
Executing: guix time-machine --channels=channels.scm -- shell -m manifest.scm -- /bin/sh -c 'set -eu; export GTK_A11Y=test GDK_BACKEND=x11 GSK_RENDERER=cairo; rm -rf build; meson setup build; ninja -C build; xvfb-run -a -s "-screen 0 1024x768x24" meson test -C build --print-errorlogs'