fix(nix): keep docs and CI out of the derivation sources - #2652
Merged
Conversation
Contributor
|
| Filename | Overview |
|---|---|
| nix/desktop-package.nix | Excludes non-build inputs from the desktop source without removing nested runtime Markdown. |
| nix/package.nix | Applies equivalent filtering to the daemon source so inherited desktop npm dependencies remain stable. |
Reviews (2): Last reviewed commit: "fix(nix): keep docs and CI out of the de..." | Re-trigger Greptile
Both Nix derivations take the whole repository as `src` and exclude only a handful of paths, so `docs/`, `.github/`, `docker/`, the agent/editor config directories and the top-level markdown are all build inputs. None of them reach the build, but any one of them changing produces a new derivation and a full rebuild — including the Expo web export, which is the dominant cost — to arrive at a byte-identical result. The daemon's filter matters for the desktop package too, not just for the daemon: desktop-package.nix inherits `npmDeps` from it, so a docs-only commit gave a new npm-deps derivation, hence a new desktop derivation, hence a full desktop rebuild even with the desktop filter tightened on its own. Markdown is excluded at the top level only. skills/*/SKILL.md is a runtime file both derivations copy into their output, so a repository-wide `*.md` exclusion would silently ship empty skill directories.
boudra
force-pushed
the
nix-desktop-src-scope
branch
from
July 31, 2026 21:48
2d68e1c to
d656162
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
nix/package.nixandnix/desktop-package.nixboth take the whole repositoryas
srcand exclude only a handful of paths. That leavesdocs/,.github/,docker/, the agent/editor config directories and the top-level markdown asbuild inputs of both derivations.
None of them reach the build, but any one of them changing produces a new
derivation and therefore a full rebuild — including the Expo web export, which
dominates the build — to arrive at a byte-identical result. A docs-only or
workflow-only commit currently costs a complete desktop rebuild.
The npmDeps coupling
Tightening the desktop filter alone does nothing, which is worth spelling out:
desktop-package.nixinheritsnpmDepsfrom the daemon, so the daemon'ssrcfeeds the desktop derivation too. With only the desktop filter changed, a
docs-only edit still produced a new
npm-depsderivation, hence a new desktopderivation, hence a full rebuild. Both filters have to move together.
Markdown scope
Markdown is excluded at the top level only (
README,CHANGELOG,AGENTS...).skills/*/SKILL.mdis a runtime file both derivations copy into their output,so a repository-wide
*.mdexclusion would silently ship empty skilldirectories — the derivation hash test would not have caught that.
Verification
nix eval .#desktop.drvPathand.#paseo.drvPathare now unchanged acrossedits to
docs/,.github/workflows/,docker/andREADME.md; before thischange both paths moved.
nix build .#desktopsucceeds, and the output still contains all 5skills/*/SKILL.mdfiles, with nodocs/or.github/in the result.