mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Expose generated option docs as packages
This commit is contained in:
parent
ff00c859d0
commit
bb9803d07a
1 changed files with 7 additions and 4 deletions
|
@ -80,6 +80,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
generatedDocs = lib.mapAttrs (k: optionsDoc) repos;
|
||||
generatedDocs' = lib.mapAttrs' (name: value: { name = "generated-docs-${name}"; inherit value; }) generatedDocs;
|
||||
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
|
@ -107,10 +110,10 @@
|
|||
mkdir -p src/options
|
||||
${lib.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList
|
||||
(name: repo: ''
|
||||
cp '${optionsDoc repo}/options.md' 'src/options/${name}.md'
|
||||
(name: generated: ''
|
||||
cp '${generated}/options.md' 'src/options/${name}.md'
|
||||
'')
|
||||
repos)
|
||||
generatedDocs)
|
||||
}
|
||||
|
||||
mdbook build --dest-dir $out
|
||||
|
@ -122,6 +125,6 @@
|
|||
'';
|
||||
dontInstall = true;
|
||||
};
|
||||
};
|
||||
} // generatedDocs';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue