mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Build the manual with Meson
Co-Authored-By: Qyriad <qyriad@qyriad.me> Co-Authored-By: Robert Hensing <robert@roberthensing.nl> Co-Authored-By: eldritch horrors <pennae@lix.systems> Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com> Co-authored-by: Tom Bereknyei <tomberek@gmail.com>
This commit is contained in:
parent
67a66212c3
commit
08b59aad31
24 changed files with 805 additions and 3 deletions
63
doc/manual/src/command-ref/meson.build
Normal file
63
doc/manual/src/command-ref/meson.build
Normal file
|
@ -0,0 +1,63 @@
|
|||
xp_features_json = custom_target(
|
||||
command : [nix, '__dump-xp-features'],
|
||||
capture : true,
|
||||
output : 'xp-features.json',
|
||||
)
|
||||
|
||||
experimental_features_shortlist_md = custom_target(
|
||||
command : nix_eval_for_docs + [
|
||||
'--expr',
|
||||
'import @INPUT0@ (builtins.fromJSON (builtins.readFile ./@INPUT1@))',
|
||||
],
|
||||
input : [
|
||||
'../../generate-xp-features-shortlist.nix',
|
||||
xp_features_json,
|
||||
],
|
||||
output : 'experimental-features-shortlist.md',
|
||||
capture : true,
|
||||
env : nix_env_for_docs,
|
||||
)
|
||||
|
||||
nix3_cli_files = custom_target(
|
||||
command : [
|
||||
python.full_path(),
|
||||
'@INPUT0@',
|
||||
'@OUTPUT@',
|
||||
'--'
|
||||
] + nix_eval_for_docs + [
|
||||
'--expr',
|
||||
'import @INPUT1@ true (builtins.readFile ./@INPUT2@)',
|
||||
],
|
||||
input : [
|
||||
'../../remove_before_wrapper.py',
|
||||
'../../generate-manpage.nix',
|
||||
nix3_cli_json,
|
||||
],
|
||||
output : 'new-cli',
|
||||
env : nix_env_for_docs,
|
||||
)
|
||||
|
||||
conf_file_md_body = custom_target(
|
||||
command : [
|
||||
nix_eval_for_docs,
|
||||
'--expr',
|
||||
'import @INPUT0@ { prefix = "conf"; } (builtins.fromJSON (builtins.readFile ./@INPUT1@))',
|
||||
],
|
||||
capture : true,
|
||||
input : [
|
||||
'../../generate-settings.nix',
|
||||
conf_file_json,
|
||||
],
|
||||
output : 'conf-file.body.md',
|
||||
env : nix_env_for_docs,
|
||||
)
|
||||
|
||||
conf_file_md = custom_target(
|
||||
command : [ 'cat', '@INPUT0@', '@INPUT1@' ],
|
||||
capture : true,
|
||||
input : [
|
||||
'conf-file-prefix.md',
|
||||
conf_file_md_body,
|
||||
],
|
||||
output : 'conf-file.md',
|
||||
)
|
12
doc/manual/src/development/meson.build
Normal file
12
doc/manual/src/development/meson.build
Normal file
|
@ -0,0 +1,12 @@
|
|||
experimental_feature_descriptions_md = custom_target(
|
||||
command : nix_eval_for_docs + [
|
||||
'--expr',
|
||||
'import @INPUT0@ (builtins.fromJSON (builtins.readFile @INPUT1@))',
|
||||
],
|
||||
input : [
|
||||
'../../generate-xp-features.nix',
|
||||
xp_features_json,
|
||||
],
|
||||
capture : true,
|
||||
output : 'experimental-feature-descriptions.md',
|
||||
)
|
1
doc/manual/src/language/constructs.md
Normal file
1
doc/manual/src/language/constructs.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Language Constructs
|
20
doc/manual/src/language/meson.build
Normal file
20
doc/manual/src/language/meson.build
Normal file
|
@ -0,0 +1,20 @@
|
|||
builtins_md = custom_target(
|
||||
command : [
|
||||
python.full_path(),
|
||||
'@INPUT0@',
|
||||
'@OUTPUT@',
|
||||
'--'
|
||||
] + nix_eval_for_docs + [
|
||||
'--expr',
|
||||
'(builtins.readFile @INPUT3@) + import @INPUT1@ (builtins.fromJSON (builtins.readFile ./@INPUT2@)) + (builtins.readFile @INPUT4@)',
|
||||
],
|
||||
input : [
|
||||
'../../remove_before_wrapper.py',
|
||||
'../../generate-builtins.nix',
|
||||
language_json,
|
||||
'builtins-prefix.md',
|
||||
'builtins-suffix.md'
|
||||
],
|
||||
output : 'builtins.md',
|
||||
env : nix_env_for_docs,
|
||||
)
|
1
doc/manual/src/language/values.md
Normal file
1
doc/manual/src/language/values.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Data Types
|
17
doc/manual/src/meson.build
Normal file
17
doc/manual/src/meson.build
Normal file
|
@ -0,0 +1,17 @@
|
|||
summary_rl_next = custom_target(
|
||||
command : [
|
||||
bash,
|
||||
'-euo', 'pipefail',
|
||||
'-c',
|
||||
'''
|
||||
if [ -e "@INPUT@" ]; then
|
||||
echo ' - [Upcoming release](release-notes/rl-next.md)'
|
||||
fi
|
||||
''',
|
||||
],
|
||||
input : [
|
||||
rl_next_generated,
|
||||
],
|
||||
capture: true,
|
||||
output : 'SUMMARY-rl-next.md',
|
||||
)
|
1
doc/manual/src/protocols/json/index.md
Normal file
1
doc/manual/src/protocols/json/index.md
Normal file
|
@ -0,0 +1 @@
|
|||
# JSON Formats
|
24
doc/manual/src/release-notes/meson.build
Normal file
24
doc/manual/src/release-notes/meson.build
Normal file
|
@ -0,0 +1,24 @@
|
|||
rl_next_generated = custom_target(
|
||||
command : [
|
||||
'bash',
|
||||
'-euo',
|
||||
'pipefail',
|
||||
'-c',
|
||||
'''
|
||||
if type -p build-release-notes > /dev/null; then
|
||||
build-release-notes --change-authors @CURRENT_SOURCE_DIR@/../../change-authors.yml @CURRENT_SOURCE_DIR@/../../rl-next
|
||||
elif type -p changelog-d > /dev/null; then
|
||||
changelog-d @CURRENT_SOURCE_DIR@/../../rl-next
|
||||
fi
|
||||
@0@ @INPUT0@ @CURRENT_SOURCE_DIR@/../../rl-next > @DEPFILE@
|
||||
'''.format(
|
||||
python.full_path(),
|
||||
),
|
||||
],
|
||||
input : [
|
||||
generate_manual_deps,
|
||||
],
|
||||
output : 'rl-next.md',
|
||||
capture : true,
|
||||
depfile : 'rl-next.d',
|
||||
)
|
18
doc/manual/src/store/meson.build
Normal file
18
doc/manual/src/store/meson.build
Normal file
|
@ -0,0 +1,18 @@
|
|||
types_dir = custom_target(
|
||||
command : [
|
||||
python.full_path(),
|
||||
'@INPUT0@',
|
||||
'@OUTPUT@',
|
||||
'--'
|
||||
] + nix_eval_for_docs + [
|
||||
'--expr',
|
||||
'import @INPUT1@ (builtins.fromJSON (builtins.readFile ./@INPUT2@)).stores',
|
||||
],
|
||||
input : [
|
||||
'../../remove_before_wrapper.py',
|
||||
'../../generate-store-types.nix',
|
||||
nix3_cli_json,
|
||||
],
|
||||
output : 'types',
|
||||
env : nix_env_for_docs,
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue