Commit graph

447513 commits

Author SHA1 Message Date
pennae 0a6e6cf7e6 nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
2023-01-27 20:07:34 +01:00
pennae 8b8670db10 nixos-render-docs: add manual chapter rendering support
this is not yet able to produce manual-combined.xml, but the intention
is to add that support before too long. for now we'll concentrate on
getting the basics working: concatenating a list of chapters into a
manual-combined fragment, which will be rendered via docbook.
2023-01-27 20:07:34 +01:00
pennae 4e2e950ab1 nixos-render-docs: compact lists support
previously we did not detect whether lists were supposed to be compact
or not. this will make a difference for manual chapters, so let's stop
not doing that.
2023-01-27 20:07:34 +01:00
pennae 8e3b2a4eaa nixos-render-docs: add heading id support
as with inline spans we support only ids being set for heading, not
arbitrary attributes or classes.
2023-01-27 20:07:34 +01:00
pennae 82d5698e22 nixos-render-docs: add headings and ordered lists
headings are not supported in options docs (since it's unclear what that
would be in the final manual, and the docbook stylesheets already have
trouble rendering all docbook constructs correctly). ordered lists
should be supported, but obviously nothing uses them yet.
2023-01-27 20:07:34 +01:00
pennae 00a1b41c3b nixos-render-docs: add html comment plugins
options do not use comments, but a number of manual chapters do. since
we don't want to enable html just so we can then inspect the html and
figure out whether it's a comment we'll instead add a plugin that
detects comments natively.
2023-01-27 20:07:34 +01:00
pennae 6829c6c335 nixos-render-docs: add inline anchor plugin
supports the […]{#id} inline anchor syntax. other features of bracketed
spans are intentionally not supported.
2023-01-27 20:07:34 +01:00
pennae 41a5c3a93d nixos-render-docs: prepare for plugins
we will soon add plugins to this tool to support nixos markdown features
that aren't readily supported with markdown-it plugins. since we will
have to test these plugin we'll need access to the parser, and since
we'll also want to add functions that require postprocessing of a parsed
token stream we also add the necessary hooks now.
2023-01-27 20:07:34 +01:00
pennae c2e638391e nixos-render-docs: use only one container plugin instance
with some fiddling and custom validation logic we can avoid needing
multiple instances of this plugin. originally this wasn't done because
it does need a type stack to emit correct docbook, but since we can
easily do that now we may as well.
2023-01-27 20:07:34 +01:00
pennae 7605068000 nixos-render-docs: add tip and caution admonitions 2023-01-27 20:07:34 +01:00
pennae e8c5618b67 nixos-render-docs: add some better CLI infrastructure
using environment variables isn't great once multiple input or output
formats get involved (which will happen soon). now is a good time to set
a pattern for future converters.
2023-01-27 20:07:34 +01:00
pennae e0596e0940 nixos-render-docs: generalize option converter
while we won't have other converters (with other output formats) for a
while yet it still seems like a good idea to generalize *now* so we have
a pattern to follow.
2023-01-27 20:07:34 +01:00
pennae ccb586299d nixos-render-docs: move options conversion to options module 2023-01-27 20:07:34 +01:00
pennae aa3fd2865b nixos-render-docs: move some options helpers to new module 2023-01-27 20:07:33 +01:00
pennae c63a550e7b nixos-render-docs: don't use env for renderer state
since we keep the renderer around for a long time we don't need to stick
renderer state into env, we can use the renderer instance itself instead.
2023-01-27 20:07:33 +01:00
pennae 1016b727a8 nixos-render-docs: add Renderer base class 2023-01-27 20:07:33 +01:00
pennae 5e37d9f29e nixos-render-docs: improve type annotations in docbook 2023-01-27 20:07:33 +01:00
pennae a4ec68a777 nixos-render-docs: move docbook renderer to docbook module 2023-01-27 20:07:33 +01:00
pennae 986e48ca22 nixos-render-docs: move escaping functions to new modules
these modules will be extended with more functionality. md will
ultimately contain MD-related code such as parsers and converter base
classes. docbook will contain renderers.
2023-01-27 20:07:33 +01:00
pennae be6a25368f nixos-render-docs: init from optionsToDocbook.py
this new package shall eventually contain the rendering code necessary
to produce the entirety of the nixos (not nixpkgs) manual, in all of its
various output formats.
2023-01-27 20:07:33 +01:00
pennae 9ff987764c nixos/make-options-doc: enable smartquotes and replacements
the rest of the nixos manual has them enabled, so we should enable them
here too for consistency.

this changes rendered output pervasively. changes also include quotes in
types (eg in `strings concatenated with "\n"`), but since those are not
code this is probably fine. if not we can probably add a myst role to
inhibit replacements.
2023-01-26 00:38:06 +01:00
pennae de22a26b4c nixos/make-options-doc: render option types through md
no changes to rendered output, but options.xml loses a few spaces.
2023-01-26 00:38:06 +01:00
pennae 6b677d9148 nixos/make-options-doc: disable inline html
we target not only html, but also manpages. inline html is not helpful
for the latter.
2023-01-26 00:38:06 +01:00
pennae ba1f533134 nixos/make-option-docs: wrap md parser+renderer into Converter
the new rendering tool will consist of a number of different Converters,
each with a possibly specialized Renderer.
2023-01-26 00:38:06 +01:00
pennae 3e45994a3b nixos/make-options-doc: don't use inspect for optionsToDocbook
the rules are fixed, and we want to support all of them (or throw a
useful error message). this will also become the base for a generic
renderer system, so let's just list all the rules statically.
2023-01-26 00:38:06 +01:00
Weijia Wang 32b1ca6d3e
Merge pull request #211358 from r-ryantm/auto-update/spicedb-zed
spicedb-zed: 0.7.5 -> 0.8.0
2023-01-26 00:33:13 +01:00
Robert Hensing d255493e8f nixos/optionsToDocbook.py: Add docbook ns for when the appendix tag is omitted 2023-01-26 00:32:56 +01:00
pennae 617822c95b nixos/manual: remove olinkdb
as far as we can tell nixos has only ever had a total of one olink, and
currently has no olinks at all. we can't currently represent olinks in
markdown docs, and if we re-add support for cross-document links they
will take a different form (and not use docbook, which will have to be
phased out before we re-add anything).

the olinkdb is thus unused and takes 10 seconds on our machine to build,
holding up the rest of the manual for no benefit.
2023-01-26 00:32:56 +01:00
pennae 0175a91aa3 nixos/make-options-doc: split docbook conversion from mergeJSON
this restores mergeJSON to its former glory if…merging json, and
extracts the MD rendering into a new script that will run instead of the
py+nix+xslt pipeline we previously ran to convert options.json to docbook.

this change alone gives a noticable performance boost when building
docs (18s instead of 27s to build optionsDocBook).

no changes to rendered output, except for a single example in the
rsnapshot module that uses hard tabs for indentation instead of spaces.
this probably isn't important.

docbook warnings remain with mergeJSON since the other processing steps
output single files instead of directories. since we'll only keep the
check until 23.11 this is probably also not important to fix.

also contains a few improvements to error reporting in the MD renderers.
2023-01-26 00:32:56 +01:00
pennae 381dcd7f9d nixos/make-options-doc: remove program argument to xslt
this doesn't seem to be set anywhere, not from make-options-doc nor
anywhere else.
2023-01-26 00:32:56 +01:00
Weijia Wang 45ef4e622c
Merge pull request #211331 from r-ryantm/auto-update/automatic-timezoned
automatic-timezoned: 1.0.55 -> 1.0.57
2023-01-26 00:30:13 +01:00
Anderson Torres 6fd1162be0
Merge pull request #212657 from OPNA2608/update/palemoon
palemoon: 31.4.2 -> 32.0.0
2023-01-25 20:19:19 -03:00
Nick Cao 4ac0c94384
Merge pull request #212623 from ckiee/step-ca-0-23-1-test-no-parallel
step-ca: fix flaky test parallelism
2023-01-26 06:32:45 +08:00
Alexis Hildebrandt 5df199b2cc gh: 2.21.2 -> 2.22.0 2023-01-26 08:24:49 +10:00
Weijia Wang 47e49ff02b
Merge pull request #212551 from peterhoeg/u/gcompris_3_1
gcompris: 2.4 -> 3.1
2023-01-25 23:14:48 +01:00
Weijia Wang e2c9528710
Merge pull request #212638 from SuperSandro2000/gource
gource: 0.53 -> 0.54
2023-01-25 23:12:18 +01:00
Fabian Affolter 22a9086877
Merge pull request #211901 from fabaff/jedi-language-server-fix
python310Packages.pygls: 0.13.0 -> 1.0.0, python310Packges.cmake-language-server: 0.1.6 -> unstable-2023-01-08
2023-01-25 23:10:05 +01:00
Fabian Affolter bdbdd06dd0
Merge pull request #212578 from r-ryantm/auto-update/python310Packages.pywbem
python310Packages.pywbem: 1.5.0 -> 1.6.0
2023-01-25 23:09:29 +01:00
Fabian Affolter dad8a12220
Merge pull request #212660 from r-ryantm/auto-update/python310Packages.google-cloud-monitoring
python310Packages.google-cloud-monitoring: 2.14.0 -> 2.14.1
2023-01-25 23:08:24 +01:00
Weijia Wang e370058372
Merge pull request #212651 from LeSuisse/mysql-8.0.32
mysql80: 8.0.31 -> 8.0.32
2023-01-25 23:01:53 +01:00
Weijia Wang 40b6464336
Merge pull request #212640 from r-ryantm/auto-update/igv
igv: 2.15.4 -> 2.15.5
2023-01-25 23:01:19 +01:00
Weijia Wang ba127c6a0e
Merge pull request #212637 from SubhrajyotiSen/update-maestro
maestro: 1.20.0 -> 1.21.0
2023-01-25 22:58:21 +01:00
Weijia Wang 225af8d6c9
Merge pull request #212644 from r-ryantm/auto-update/rke
rke: 1.4.1 -> 1.4.2
2023-01-25 22:58:03 +01:00
Weijia Wang 52c54130b3
Merge pull request #212598 from alyssais/umockdev-homepage
umockdev: set meta.homepage
2023-01-25 22:55:23 +01:00
John Ericson 17372f3328
Merge pull request #212671 from alyssais/wavpack-iconv
wavpack: depend on libiconv unconditionally
2023-01-25 16:53:53 -05:00
John Ericson 9cd306b15a
Merge pull request #212670 from alyssais/qrencode-iconv
qrencode: depend on libiconv unconditionally
2023-01-25 16:53:19 -05:00
John Ericson fd7e9aa848
Merge pull request #212669 from alyssais/libdatrie-iconv
libdatrie: depend on libiconv unconditionally
2023-01-25 16:52:58 -05:00
John Ericson ebd76cadc8
Merge pull request #212668 from alyssais/libargon2-bsd
libargon2: broaden platforms
2023-01-25 16:52:14 -05:00
John Ericson 0a4f08aaf4
Merge pull request #212667 from alyssais/argp-standalone-1.5.0
argp-standalone: 1.3 -> 1.5.0; broaden platforms
2023-01-25 16:51:59 -05:00
John Ericson 8338356253
Merge pull request #212664 from alyssais/minicom-bsd
minicom: broaden platforms
2023-01-25 16:51:16 -05:00