fix(#2167): keep docs/ in hyperhive flake source — reference-docs builds from it
This commit is contained in:
parent
b63c6c543d
commit
7d35ad1751
1 changed files with 13 additions and 8 deletions
21
flake.nix
21
flake.nix
|
|
@ -29,17 +29,23 @@
|
|||
# Explicit per-consumer source filter for the hyperhive flake path
|
||||
# handed to hive-c0re (`hyperhiveFlake`, below). A filtered view of
|
||||
# this repo that drops files no nix or cargo derivation reads —
|
||||
# documentation, shell helper scripts, and root-level markdown — so
|
||||
# editing them does NOT change the store path and therefore does NOT
|
||||
# force a rebuild of every agent container.
|
||||
# shell helper scripts and root-level markdown — so editing them
|
||||
# does NOT change the store path and therefore does NOT force a
|
||||
# rebuild of every agent container.
|
||||
#
|
||||
# Companion to the rust `cleanSrc` (crane's cargo-source filter):
|
||||
# each real source is a named, explicitly-filtered derivation used
|
||||
# as `src`, rather than an inline filter at the use site.
|
||||
#
|
||||
# Dropped: docs/, scripts/, root-level *.md (README/CLAUDE/TODO/…).
|
||||
# Kept (build needs them): .nix, .rs, Cargo.*, branding/, frontend/,
|
||||
# prompts/, flake.lock.
|
||||
# Dropped: scripts/, root-level *.md (README/CLAUDE/TODO/…).
|
||||
# Kept (build needs them): .nix, .rs, Cargo.*, branding/, docs/,
|
||||
# frontend/, prompts/, flake.lock. docs/ MUST stay in: the
|
||||
# reference-docs derivation (nix/reference-docs.nix, shipped into
|
||||
# every agent container via claude --add-dir) builds from ../docs,
|
||||
# so a flake source without it can't evaluate — container rebuilds
|
||||
# from the meta flake die with "path …/docs does not exist". The
|
||||
# rebuild-avoidance for doc edits is gone by design: containers now
|
||||
# genuinely depend on the docs tree.
|
||||
hyperhiveFlakeSource = lib.cleanSourceWith {
|
||||
name = "hyperhive-flake-source";
|
||||
src = ./.;
|
||||
|
|
@ -49,8 +55,7 @@
|
|||
# Repo-relative path (strip the absolute source-dir prefix).
|
||||
rel = lib.removePrefix (toString ./. + "/") (toString path);
|
||||
in
|
||||
!(lib.hasPrefix "docs/" rel || rel == "docs")
|
||||
&& !(lib.hasPrefix "scripts/" rel || rel == "scripts")
|
||||
!(lib.hasPrefix "scripts/" rel || rel == "scripts")
|
||||
&& !(type == "regular" && !lib.hasInfix "/" rel && lib.hasSuffix ".md" rel);
|
||||
};
|
||||
treefmt-config = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue