hyperhive/nix/reference-docs.nix

41 lines
1.2 KiB
Nix

{
stdenv,
}:
# 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";
};
}