From 499f72387374383d28673316749e5946d5a61c31 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 30 Apr 2024 19:21:39 +0200 Subject: doc: Use substitute --replace-fail in manuals This fixes a warning about --replace being deprecated. --- doc/default.nix | 2 +- nixos/doc/manual/default.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/default.nix b/doc/default.nix index 76aba1a03eaf2..ca4091dc222cc 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -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 diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 558fec4cab923..80916e9733c5c 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -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 '}' \ -- cgit 1.4.1