buzz & precommits

This commit is contained in:
ari committed 2026-10-26 16:26:06 -04:00
1 parent 3a2cb09d07
commit 2e8529fff0
3 files changed
+25 -2

No files matched your search

+22
View File
@@ -220,11 +220,33 @@
let
pkgs = nixpkgs.legacyPackages.${system};
qtDocs = pkgs.qt6.qtdoc;
# Hook: run skyg pkgs update --all before every commit; fail if it bumped
# anything under pkgs/ so bumps get reviewed and staged, never auto-committed.
pkgs-update-script = pkgs.writeShellScriptBin "skyg-pkgs-update" ''
set -euo pipefail
export PATH=${pkgs.bash}/bin:${pkgs.coreutils}/bin:${pkgs.curl}/bin:${pkgs.jq}/bin:${pkgs.git}/bin:${pkgs.gnused}/bin:${pkgs.gawk}/bin:$PATH
root=$(${pkgs.git}/bin/git rev-parse --show-toplevel)
cd "$root"
${pkgs.nushell}/bin/nu --commands 'use ./bin/lib/cmds.nu *; skyg pkgs update --all'
if ! ${pkgs.git}/bin/git diff --quiet -- pkgs/; then
echo ""
echo "pkgs-update: version bumps applied under pkgs/ — review 'git diff pkgs/',"
echo "stage them ('git add pkgs/') and commit again."
exit 1
fi
'';
pre-commit-check = git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
stylua.enable = true;
pkgs-update = {
enable = true;
entry = "${pkgs-update-script}/bin/skyg-pkgs-update";
language = "system";
pass_filenames = false;
always_run = true;
};
};
};
in
+2 -1
View File
@@ -10,7 +10,7 @@ Packages here are exposed via an overlay defined in `modules/core/default.nix`.
| `colibri/` | colibrì (`JustVugg/colibri`) — GLM-5.2/OLMoE local inference engine, built from source, pinned to a tagged release. Backend-parameterized (`backend = "cpu" \| "rocm"`). Exposed as `pkgs.colibri` (cpu, default), `pkgs.colibri-rocm` (Strix Halo / gfx1151). Installs the `coli` CLI (wrapped with the Python env its converter/bench subcommands need) plus the bundled `colibri`/`olmoe` engine binaries. Model weights are a runtime concern and not packaged. |
| `niri-touchscreen-gestures/` | Python daemon that reads multi-touch events from a touchscreen via `evdev`, detects 2/3/4-finger swipes (up/down/left/right), and dispatches configurable `niri msg action` commands. Configured via TOML; exposed as `pkgs.niri-touchscreen-gestures`. |
| `buzz-desktop/` | Block Buzz desktop (Type-2 AppImage from `block/buzz`). Wrapped with `appimageTools.wrapType2` plus extra FHS libs (`elfutils`, `zstd`, WebKit/tray, GStreamer good/bad) so it runs on NixOS. Exposed as `pkgs.buzz-desktop` (`buzz-desktop` binary + desktop entry / icons). |
| `buzz-cli/` | Buzz CLI (`buzz`, `crates/buzz-cli` of `block/buzz`), built with `rustPlatform.buildRustPackage` from the same tag as `buzz-desktop`. Hermes's Buzz platform shells out to it. Bump with `update.sh` (sets the source hash, resets `cargoHash` to `lib.fakeHash`; build once and paste the `got:` hash). Robots call it with `pkgs.callPackage` (their nixpkgs has no host overlay). |
| `buzz-cli/` | Buzz CLI (`buzz`, `crates/buzz-cli` of `block/buzz`), built with `rustPlatform.buildRustPackage` from the same tag as `buzz-desktop`. Hermes's Buzz platform shells out to it. Bump with `update.sh` (sets the source hash, resets `cargoHash` to `lib.fakeHash`; build once and paste the `got:` hash). Robots call it with `pkgs.callPackage` (their nixpkgs has no host overlay). |
| `delta-editor/` | Delta Editor (Zed Industries' AI-native editor, `delta.dev`) prebuilt tarball. No stable URL exists — the release API returns a short-lived signed R2 link — so `src` is a fixed-output derivation that resolves the API at build time. Interpreter/RPATH patched (`--force-rpath`, `dontPatchELF`), dlopen'd graphics libs (`libglvnd`, `vulkan-loader`, `wayland`) added via wrapper, `XKB_CONFIG_ROOT` set for the bundled libxkbcommon. Exposed as `pkgs.delta-editor` (`delta-editor` binary + desktop entry / icons); named `-editor` to avoid clashing with the `delta` git diff pager. |
## Adding a New Package
@@ -32,6 +32,7 @@ Each package can have an `update.sh` script that automates version bumps.
- **`skyg pkgs update --all`** — auto-detect the latest version for all packages that have `update.sh`.
- **`skyg pkgs update <pkg-name>`** — auto-detect the latest version for a single package.
- **`skyg pkgs update <pkg-name> <version>`** — bump a specific package to a specific version.
- **Pre-commit hook** — a `pkgs-update` hook (defined in `flake.nix`) runs `skyg pkgs update --all` before every commit and blocks the commit if it changed anything under `pkgs/` (review + `git add pkgs/`, then commit again).
Each `update.sh` supports two modes:
+1 -1
View File
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
};
# The workspace has git deps in [patch.crates-io]; cargoHash covers them.
cargoHash = lib.fakeHash;
cargoHash = "sha256-UQ8qNqoeDwkwhmVZebi++gb2GP61dr1Zv2QU9mJ6KJ8=";
# Only this crate; the workspace has 30+ others (relay, db, ...).
cargoBuildFlags = [ "-p" "buzz-cli" ];