Back to feed

sledtools/pika branch #147

pika-build-deploy-fix

Remove deleted ci tree from pikaci source set

Target branch: master

Merge Commit: 1de303dcc9590022db0aa074bb3dcd74e47063f0

branch: merged tutorial: ready ci: success
Open CI Details

Continuous Integration

CI: success

Compact status on the review page, with full logs on the CI page.

Open CI Details

Latest run #183 success

head 0fc07f97e98120b126d9e49cfadcc3f14fb55ca7 · queued 2026-03-27 14:25:08 · 0 lane(s)

queued 5m 21s

No lanes were selected for this branch head.

Summary

This branch removes the ./ci directory from the Nix fileset that defines the source inputs for the pikaci derivation. The ./ci directory was previously deleted from the repository, but its reference in flake.nix remained, causing Nix build failures because lib.fileset.unions expects all listed paths to exist. This one-line fix aligns the declared source set with the actual repository contents, restoring successful builds and deployments.

Tutorial Steps

Remove stale `./ci` path from the pikaci source fileset

Intent: The `./ci` directory was deleted from the repository in a prior change, but `flake.nix` still referenced it inside the `lib.fileset.unions` list that assembles sources for the pikaci Nix derivation. Nix evaluates all fileset entries eagerly, so referencing a non-existent path causes the build to fail. This step removes the dangling reference to restore a valid fileset.

Affected files: flake.nix

Evidence
@@ -182,7 +182,6 @@
         fileset = lib.fileset.unions [
           ./Cargo.toml
           ./Cargo.lock
-          ./ci
           ./flake.nix
           ./flake.lock
           ./cli

Problem

The flake.nix file declares a fileset via lib.fileset.unions (line 182) that enumerates every directory and file to include in the Nix store path used to build pikaci. One of those entries was ./ci:

fileset = lib.fileset.unions [
  ./Cargo.toml
  ./Cargo.lock
  ./ci          # <-- deleted from the repo, but still referenced
  ./flake.nix
  ...
];

Because the ./ci directory no longer exists on disk, Nix fails during evaluation with a "path does not exist" error, blocking all builds and deployments.

Fix

The fix is a single-line deletion at flake.nix:185 — remove the ./ci entry from the unions list. No replacement is needed because the directory itself has already been removed.

fileset = lib.fileset.unions [
  ./Cargo.toml
  ./Cargo.lock
  ./flake.nix
  ./flake.lock
  ./cli
  ...
];

Why this matters

lib.fileset.unions is strict: every path must resolve to an existing file or directory at evaluation time. Unlike filterSource or optional path helpers, there is no implicit "skip if missing" behavior. When the ./ci tree was deleted without a corresponding update to flake.nix, the entire Nix flake became unevaluable, which means nix build, nix develop, and any CI/CD pipelines relying on the flake would fail immediately.

Verification

After applying this change, run:

nix flake check
nix build .#pikaci

Both commands should complete without path-resolution errors.

Diff