mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-15 17:50:53 +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
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
|
@ -107,10 +110,10 @@
|
||||||
mkdir -p src/options
|
mkdir -p src/options
|
||||||
${lib.concatStringsSep "\n"
|
${lib.concatStringsSep "\n"
|
||||||
(lib.mapAttrsToList
|
(lib.mapAttrsToList
|
||||||
(name: repo: ''
|
(name: generated: ''
|
||||||
cp '${optionsDoc repo}/options.md' 'src/options/${name}.md'
|
cp '${generated}/options.md' 'src/options/${name}.md'
|
||||||
'')
|
'')
|
||||||
repos)
|
generatedDocs)
|
||||||
}
|
}
|
||||||
|
|
||||||
mdbook build --dest-dir $out
|
mdbook build --dest-dir $out
|
||||||
|
@ -122,6 +125,6 @@
|
||||||
'';
|
'';
|
||||||
dontInstall = true;
|
dontInstall = true;
|
||||||
};
|
};
|
||||||
};
|
} // generatedDocs';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue