doc: Use substitute --replace-fail in manuals

This fixes a warning about --replace being deprecated.
This commit is contained in:
Jan Tojnar 2024-04-30 19:21:39 +02:00
parent 29521b42cf
commit 499f723873
2 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ in pkgs.stdenv.mkDerivation {
${lib-docs}/index.md \
> ./functions/library.md
substitute ./manual.md.in ./manual.md \
--replace '@MANUAL_VERSION@' '${pkgs.lib.version}'
--replace-fail '@MANUAL_VERSION@' '${pkgs.lib.version}'
mkdir -p out/media

View File

@ -80,17 +80,17 @@ let
cp -r --no-preserve=all $inputs/* .
substituteInPlace ./manual.md \
--replace '@NIXOS_VERSION@' "${version}"
--replace-fail '@NIXOS_VERSION@' "${version}"
substituteInPlace ./configuration/configuration.md \
--replace \
--replace-fail \
'@MODULE_CHAPTERS@' \
${escapeShellArg (concatMapStringsSep "\n" (p: "${p.value}") config.meta.doc)}
substituteInPlace ./nixos-options.md \
--replace \
--replace-fail \
'@NIXOS_OPTIONS_JSON@' \
${optionsDoc.optionsJSON}/${common.outputPath}/options.json
substituteInPlace ./development/writing-nixos-tests.section.md \
--replace \
--replace-fail \
'@NIXOS_TEST_OPTIONS_JSON@' \
${testOptionsDoc.optionsJSON}/${common.outputPath}/options.json
sed -e '/@PYTHON_MACHINE_METHODS@/ {' -e 'r ${testDriverMachineDocstrings}/machine-methods.md' -e 'd' -e '}' \