1
0
Fork 0
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:
Robert Hensing 2022-11-11 12:57:01 +01:00
parent ff00c859d0
commit bb9803d07a

View file

@ -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';
}; };
} }