1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 13:51:16 +02:00

Include the Nix version in the title of the manual

This makes it easy to see at a glance what the version of the manual
is, e.g. "Nix 2.27.0 Reference Manual".
This commit is contained in:
Eelco Dolstra 2025-02-21 20:02:58 +01:00
parent 223f82efab
commit 779bb3b920
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,5 @@
[book]
title = "Nix Reference Manual"
title = "Nix @version@ Reference Manual"
src = "source"
[output.html]

View file

@ -83,6 +83,7 @@ manual = custom_target(
'''
@0@ @INPUT0@ @CURRENT_SOURCE_DIR@ > @DEPFILE@
@0@ @INPUT1@ summary @2@ < @CURRENT_SOURCE_DIR@/source/SUMMARY.md.in > @2@/source/SUMMARY.md
sed -e 's|@version@|@3@|g' < @INPUT2@ > @2@/book.toml
rsync -r --include='*.md' @CURRENT_SOURCE_DIR@/ @2@/
(cd @2@; RUST_LOG=warn @1@ build -d @2@ 3>&2 2>&1 1>&3) | { grep -Fv "because fragment resolution isn't implemented" || :; } 3>&2 2>&1 1>&3
rm -rf @2@/manual
@ -92,12 +93,13 @@ manual = custom_target(
python.full_path(),
mdbook.full_path(),
meson.current_build_dir(),
meson.project_version(),
),
],
input : [
generate_manual_deps,
'substitute.py',
'book.toml',
'book.toml.in',
'anchors.jq',
'custom.css',
nix3_cli_files,