Skip to content

ci: add nix flake verification and build job#178

Merged
m3nu merged 2 commits into
mainfrom
ci-nix-build
Jul 12, 2026
Merged

ci: add nix flake verification and build job#178
m3nu merged 2 commits into
mainfrom
ci-nix-build

Conversation

@m3nu

@m3nu m3nu commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Adds a nix workflow that closes the verification gap seen in #171 / #170, where flake pin updates had no CI coverage and hashes had to be audited by hand.

The job:

  1. Pin-drift guard — asserts the skia-binaries release tag in flake.nix matches the skia-bindings version in Cargo.lock. This is load-bearing: skia-bindings' build script does not validate the archive supplied via SKIA_BINARIES_URL (upstream code has a literal // TODO: verify key), so a stale pin doesn't fail the build — it silently links the GUI against outdated skia binaries. A first run of this workflow on pre-fix(nix): support skia-bindings v0.99.0 #171 main built "successfully" against the 0.90.0 binaries while Cargo.lock declared 0.99.0, which is how this was discovered.
  2. nix flake archive — fetches every pinned input and verifies its narHash, including all three skia-binaries tarballs (inputs are not per-system, so this covers Linux and macOS pins in one cheap step). A tampered or stale hash fails here in minutes, with no compilation.
  3. nix flake check --all-systems --no-build — evaluates outputs for x86_64-linux, aarch64-linux, and aarch64-darwin, catching eval-level breakage on platforms we don't build.
  4. nix build .#vykar .#vykar-server .#vykar-gui — full build on x86_64-linux (~55 min uncached).

Triggers are paths-filtered (flake.nix, flake.lock, .nix/**, Cargo.toml, Cargo.lock, the workflow itself) so ordinary code PRs stay fast. Cargo.lock is included because a dependency bump is exactly what broke the flake in #170. Read-only token, no cache service dependencies — builds substitute from cache.nixos.org only.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploying vykar with  Cloudflare Pages  Cloudflare Pages

Latest commit: 438db70
Status: ✅  Deploy successful!
Preview URL: https://d5816fdb.vykar.pages.dev
Branch Preview URL: https://ci-nix-build.vykar.pages.dev

View logs

m3nu added 2 commits July 12, 2026 09:40
Verifies all pinned flake inputs (narHash check for every input,
including the three skia-binaries tarballs), evaluates flake outputs
for all systems, and builds the three packages on x86_64-linux.
Paths-filtered so it only runs when the flake, nix definitions, or
Cargo manifests change. Closes the gap where lock-file PRs like #171
had no machine verification.
skia-bindings' build script does not validate the archive supplied via
SKIA_BINARIES_URL, so a stale flake pin silently builds against outdated
skia binaries instead of failing the build.
@m3nu m3nu merged commit 3a500bf into main Jul 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant