Nix: evaluate the flake in CI so a new git dependency can't break nix build / nix develop again

Since UI.9 (9bfabc98) Cargo.lock has a git source, craft-ui from
storytold/craft-libs. importCargoLock needs a hash for every git
dependency, so evaluation stopped with "No hash was found while vendoring
the git dependency craft-ui-0.1.0" and both `nix build` and `nix develop`
failed on NixOS for two days (#1314 fixed it with
cargoLock.allowBuiltinFetchGit).

The flake is not built in CI, so nothing noticed: the new Nix workflow
runs `nix flake check --no-build --all-systems` whenever flake.nix,
flake.lock, nix/ or Cargo.lock change.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
dev-null-undefinedandClaude committed 2026-10-13 13:07:36 +02:00
1 parent b3d392b499
commit dfe87240b0
3 files changed
+32 -4

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
# Evaluates the Nix flake (no build, about a minute): `nix build` / `nix develop` stop at evaluation
# when Cargo.lock gains something nix/package.nix can't vendor, and nothing else would notice.
name: Nix
on:
push:
branches: [main]
paths: ["flake.nix", "flake.lock", "nix/**", "Cargo.lock", ".github/workflows/nix.yml"]
pull_request:
paths: ["flake.nix", "flake.lock", "nix/**", "Cargo.lock", ".github/workflows/nix.yml"]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: nix-${{ github.ref }}
cancel-in-progress: true
jobs:
eval:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1
- name: nix flake check --no-build
run: nix flake check --no-build --all-systems
+2 -2
View File
@@ -131,8 +131,8 @@ of it. Full standard: `../craftrules/standards/never-crash.md`
→ `ui-egui`, `mcp` (L5) → apps `lightcraft` (desktop), `lightcraft-cli` (render/commands/MCP). `scenes` generates demo
photos. `xtask` = tooling (`ci`, `layers`, `assets`, `parity`, `wasm`, `corpus`, `stats`). `flake.nix` +
`nix/package.nix` = the Nix package (`nix build` builds both binaries with the craft-fonts input, installs the
desktop file/icons/AppStream metadata and runs `cargo test --workspace`; `nix develop` = dev shell). Community-maintained and not
in CI: it may lag behind the workspace; see README → Quick start.
desktop file/icons/AppStream metadata and runs `cargo test --workspace`; `nix develop` = dev shell). Community-maintained; CI only
evaluates it (`.github/workflows/nix.yml`), so the build may lag behind the workspace; see README → Quick start.
## Contributor credits (About window)
+2 -2
View File
@@ -138,5 +138,5 @@ of it. Full standard: `../craftrules/standards/never-crash.md`
→ `ui-egui`, `mcp` (L5) → apps `lightcraft` (desktop), `lightcraft-cli` (render/commands/MCP). `scenes` generates demo
photos. `xtask` = tooling (`ci`, `layers`, `assets`, `parity`, `wasm`, `corpus`, `stats`). `flake.nix` +
`nix/package.nix` = the Nix package (`nix build` builds both binaries with the craft-fonts input, installs the
desktop file/icons/AppStream metadata and runs `cargo test --workspace`; `nix develop` = dev shell). Community-maintained and not
in CI: it may lag behind the workspace; see README → Quick start.
desktop file/icons/AppStream metadata and runs `cargo test --workspace`; `nix develop` = dev shell). Community-maintained; CI only
evaluates it (`.github/workflows/nix.yml`), so the build may lag behind the workspace; see README → Quick start.