1
0
Fork 0
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:
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
{
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';
};
}