refactor(#2012): docs in own derivation, ship via claude --add-dir (no ~/.claude clobber)
This commit is contained in:
parent
e6bc621f59
commit
362d392993
7 changed files with 123 additions and 67 deletions
43
nix/reference-docs.nix
Normal file
43
nix/reference-docs.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
}:
|
||||
|
||||
# The repo `docs/` markdown tree, shipped as a standalone derivation so
|
||||
# agents can read the reference docs in-container (added as a claude
|
||||
# additional directory by the harness) WITHOUT pulling the branding +
|
||||
# prompt assets they don't need, and so the `hyperhive/website` repo can
|
||||
# reuse the exact same tree as a flake input.
|
||||
#
|
||||
# Pure data: the docs are copied verbatim (never transformed), so there
|
||||
# is no writable/build step — `$out` is the docs tree as-is.
|
||||
#
|
||||
# Output layout:
|
||||
# $out/ — the repo `docs/` tree verbatim (e.g. `$out/setup.md`)
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hyperhive-docs";
|
||||
version = "0.1.0";
|
||||
# Narrow src (just docs/) keeps this derivation's input hash decoupled
|
||||
# from the rest of the tree — a doc edit only re-hashes this.
|
||||
src = ../docs;
|
||||
|
||||
# No build: pure markdown, nothing to compile or render.
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r ./* $out/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontFixup = true;
|
||||
|
||||
meta = {
|
||||
description = "hyperhive reference docs (the repo docs/ tree)";
|
||||
homepage = "https://forge.darkest.space/hyperhive/hyperhive";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue