1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 20:41:47 +02:00

Include Determinate Nix version number in the manual

This commit is contained in:
Eelco Dolstra 2025-02-21 19:13:51 +01:00
parent 69553dfc36
commit a1d27ff6d2
3 changed files with 7 additions and 2 deletions

View file

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

View file

@ -4,6 +4,8 @@ project('nix-manual',
license : 'LGPL-2.1-or-later',
)
fs = import('fs')
nix = find_program('nix', native : true)
mdbook = find_program('mdbook', native : true)
@ -83,6 +85,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 +95,13 @@ manual = custom_target(
python.full_path(),
mdbook.full_path(),
meson.current_build_dir(),
fs.read('../../.version-determinate').strip(),
),
],
input : [
generate_manual_deps,
'substitute.py',
'book.toml',
'book.toml.in',
'anchors.jq',
'custom.css',
nix3_cli_files,

View file

@ -30,6 +30,7 @@ mkMesonDerivation (finalAttrs: {
fileset.difference
(fileset.unions [
../../.version
../../.version-determinate
# Too many different types of files to filter for now
../../doc/manual
./.