nix-openclaw-tools/nix/checks/qmd-smoke.nix
joshp123 a0e7ac5ef1 package qmd for OpenClaw tools
What:
- add a source-built qmd package and plugin metadata
- add a no-model-download qmd smoke check
- teach update-tools to notice qmd releases and the new sonoscli asset names

Why:
- nix-openclaw needs QMD as an internal runtime battery on Darwin and Linux
- the maintainer automation should not require a separate manual qmd bump path

Tests:
- nix build .#qmd .#checks.aarch64-darwin.qmd-smoke --accept-flake-config --no-link
- nix shell nixpkgs#go --command go test ./...
2026-05-06 09:31:57 +02:00

26 lines
631 B
Nix

{
runCommand,
qmd,
}:
runCommand "qmd-smoke" { nativeBuildInputs = [ qmd ]; } ''
set -eu
export HOME="$TMPDIR/home"
export XDG_CONFIG_HOME="$TMPDIR/config"
export XDG_CACHE_HOME="$TMPDIR/cache"
export XDG_DATA_HOME="$TMPDIR/data"
mkdir -p "$HOME" "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_DATA_HOME" "$TMPDIR/notes"
printf '%s\n\n%s\n' '# Smoke' 'qmd packaging smoke' > "$TMPDIR/notes/smoke.md"
qmd --help >/dev/null
qmd collection list >/dev/null
qmd collection add "$TMPDIR/notes" --name smoke
qmd update
qmd search packaging --json | grep -q packaging
qmd status >/dev/null
touch "$out"
''