mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-03 17:45:03 +02:00
docs/config-examples: generate dynamically from a toml list
This should help to maintain uniformity and hopefully make contributions easier. Kept regression tests local to the derivation, however these are also added to the flake checks.
This commit is contained in:
parent
8eeea073fc
commit
a658e81d71
6 changed files with 361 additions and 56 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
callPackage,
|
||||
runCommand,
|
||||
lib,
|
||||
evaledModules,
|
||||
|
@ -349,6 +350,10 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
|||
substituteInPlace ./index.md \
|
||||
--replace-fail "@DOCS_VERSIONS@" "$(cat ${finalAttrs.passthru.docs-versions})"
|
||||
|
||||
# Patch user-configs
|
||||
substituteInPlace ./user-guide/config-examples.md \
|
||||
--replace-fail "@USER_CONFIGS@" "$(cat ${finalAttrs.passthru.user-configs})"
|
||||
|
||||
mdbook build
|
||||
cp -r ./book/* $dest
|
||||
mkdir -p $dest/search
|
||||
|
@ -398,5 +403,6 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
|||
echo "- The $link, for use with nixpkgs \`$nixpkgs\`$suffix" >> "$out"
|
||||
done
|
||||
'';
|
||||
user-configs = callPackage ../user-configs { };
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue