fix(nix): keep docs and CI out of derivation sources (#2652)
Exclude non-build repository content from the daemon and desktop derivation inputs while preserving nested runtime Markdown such as skill definitions.
This commit is contained in:
@@ -33,6 +33,21 @@ buildNpmPackage rec {
|
|||||||
&& !(lib.hasPrefix "/packages/app/ios" relPath)
|
&& !(lib.hasPrefix "/packages/app/ios" relPath)
|
||||||
# Website is unrelated to the desktop app
|
# Website is unrelated to the desktop app
|
||||||
&& !(lib.hasPrefix "/packages/website" relPath)
|
&& !(lib.hasPrefix "/packages/website" relPath)
|
||||||
|
# Documentation, CI definitions and agent/editor configuration. None of
|
||||||
|
# these reach the build, but every one of them is part of `src`, so a
|
||||||
|
# docs-only or workflow-only commit currently invalidates the whole
|
||||||
|
# desktop derivation and pays for a full Expo export to produce a
|
||||||
|
# byte-identical result.
|
||||||
|
&& !(lib.hasPrefix "/docs" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.github" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.agents" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.claude" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.codex" relPath)
|
||||||
|
&& !(lib.hasPrefix "/docker" relPath)
|
||||||
|
# Top-level prose only (README, CHANGELOG, AGENTS...). Deeper markdown is
|
||||||
|
# not necessarily documentation: skills/*/SKILL.md is a runtime file the
|
||||||
|
# installPhase copies into the output.
|
||||||
|
&& builtins.match "/[^/]+\\.md" relPath == null
|
||||||
# Test fixtures and build artifacts
|
# Test fixtures and build artifacts
|
||||||
&& !(lib.hasSuffix ".test.ts" baseName)
|
&& !(lib.hasSuffix ".test.ts" baseName)
|
||||||
&& !(lib.hasSuffix ".e2e.test.ts" baseName)
|
&& !(lib.hasSuffix ".e2e.test.ts" baseName)
|
||||||
|
|||||||
@@ -37,6 +37,21 @@ buildNpmPackage rec {
|
|||||||
&& !(lib.hasPrefix "/packages/website/public" relPath)
|
&& !(lib.hasPrefix "/packages/website/public" relPath)
|
||||||
&& !(lib.hasPrefix "/packages/desktop/src" relPath)
|
&& !(lib.hasPrefix "/packages/desktop/src" relPath)
|
||||||
&& !(lib.hasPrefix "/packages/desktop/src-tauri" relPath)
|
&& !(lib.hasPrefix "/packages/desktop/src-tauri" relPath)
|
||||||
|
# Documentation, CI definitions and agent/editor configuration. None of
|
||||||
|
# these reach the build. Excluding them here also matters for the desktop
|
||||||
|
# derivation, which inherits this package's npmDeps: leaving them in makes
|
||||||
|
# a docs-only commit produce a new npm-deps .drv, and so a new desktop
|
||||||
|
# .drv, and so a full rebuild for a byte-identical result.
|
||||||
|
&& !(lib.hasPrefix "/docs" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.github" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.agents" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.claude" relPath)
|
||||||
|
&& !(lib.hasPrefix "/.codex" relPath)
|
||||||
|
&& !(lib.hasPrefix "/docker" relPath)
|
||||||
|
# Top-level prose only (README, CHANGELOG, AGENTS...). Deeper markdown is
|
||||||
|
# not necessarily documentation: skills/*/SKILL.md is a runtime file the
|
||||||
|
# daemon's trace script copies into the output.
|
||||||
|
&& builtins.match "/[^/]+\\.md" relPath == null
|
||||||
# Exclude test fixtures and debug files
|
# Exclude test fixtures and debug files
|
||||||
&& !(lib.hasSuffix ".test.ts" baseName)
|
&& !(lib.hasSuffix ".test.ts" baseName)
|
||||||
&& !(lib.hasSuffix ".e2e.test.ts" baseName)
|
&& !(lib.hasSuffix ".e2e.test.ts" baseName)
|
||||||
|
|||||||
Reference in New Issue
Block a user