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:
@@ -37,6 +37,21 @@ buildNpmPackage rec {
|
||||
&& !(lib.hasPrefix "/packages/website/public" relPath)
|
||||
&& !(lib.hasPrefix "/packages/desktop/src" 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
|
||||
&& !(lib.hasSuffix ".test.ts" baseName)
|
||||
&& !(lib.hasSuffix ".e2e.test.ts" baseName)
|
||||
|
||||
Reference in New Issue
Block a user