Commit Graph

243 Commits

Author SHA1 Message Date
pennae
5c5dadd382 nixos-render-docs: support compact lists in manpages
most of the lists in option docs are actually compact, but docbook to
manpage processing always rendered them as non-compact. compactifying
these lists improves readability somewhat since most lists and their
contents are pretty short.
2023-02-08 15:23:34 +01:00
pennae
10a4f0daca nixos-render-docs: add options manpage converter
mdoc is just too slow to render on groff, and semantic markup doesn't
help us any for generated pages.

this produces a lot of changes to configuration.nix.5, but only few
rendering changes. most of those seem to be place losing a space where
docbook emitted roff code that did not faithfully represent the input
text, though a few places also gained space where docbook dropped them.
notably we also don't need the compatibility code docbook-xsl emitted
because that problem was fixed over a decade ago.

this will handle block quotes, which the docbook stylesheets turned into
a mess of roff requests that ended up showing up in the output instead
of being processed.
2023-02-08 15:23:34 +01:00
pennae
56f1d99b16 nixos-render-docs: factor out sorting of options list 2023-02-08 15:23:34 +01:00
pennae
b2a5b4d789 nixos-render-docs: move list-is-compact attr to meta
Token.attr is a dict[str, str | int | float], meta has no restriction on
the value type. attrs is ostensibly meant for html attributes, meta for
any information whatsoever.
2023-02-08 15:23:34 +01:00
pennae
09411102f6 nixos-render-docs: add option block separators
this will be necessary for manpages, which separate option declarations
not with external tags but by interspersing mandoc spacing instructions.
2023-02-08 15:23:34 +01:00
pennae
32136b1b01 nixos-render-docs: don't render empty descriptions at all 2023-02-08 15:23:34 +01:00
pennae
11daebd2d9 nixos-render-docs: add block and inline joiners
these work together with render and renderInline to produce an output
from either of the two. rendering manpages will need both: to join
blocks with newlines, and to run some postprocessing and the rendered inlines.
2023-02-08 15:23:34 +01:00
pennae
5a5255983b nixos-render-docs: calculate list end indices
that'll be useful to calculate the width of list item heads, which we'll
ned to render manpages.
2023-02-08 15:23:34 +01:00
pennae
edccae739a nixos-render-docs: add a test for running mypy
pulling mypy into the build closure is unfortunately not reasonable, the
closure for mypy is rather large and takes a long time to build. if we
have the type checks hooked into CI we'll get most of the benefit though.
2023-02-08 15:23:34 +01:00
figsoda
acf0a7d9fd nix-init: 0.1.0 -> 0.1.1
Diff: https://github.com/nix-community/nix-init/compare/v0.1.0...v0.1.1

Changelog: https://github.com/nix-community/nix-init/blob/v0.1.1/CHANGELOG.md
2023-02-06 15:51:57 -05:00
pennae
9711de7b7e nixos-render-docs: improve error messages for multi-title manual chapters 2023-02-03 00:20:59 +01:00
Nick Cao
a74f695255
Merge pull request #210864 from peng1999/nix-info-patch
nix-info: fix error when no channel installed
2023-01-31 18:10:55 +08:00
Peng Guanwen
ffe9031129
Use buitins.currentSystem 2023-01-31 17:56:23 +08:00
pennae
5b6dcece88
Merge pull request #212684 from pennae/nixos-render-docs
nixos-render-docs: init, use for some manual rendering to docbook
2023-01-30 19:26:07 +01:00
figsoda
44187e2a04 nix-init: init at 0.1.0 2023-01-28 15:22:29 -05: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
Jonas Heinrich
da778757da
Merge pull request #211958 from figsoda/nixpkgs-hammering
nixpkgs-hammering: init at unstable-2022-11-15
2023-01-22 07:08:15 +01:00
figsoda
63ff217996 nixpkgs-hammering: init at unstable-2022-11-15 2023-01-21 11:26:21 -05:00
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Peng Guanwen
8bda2c3acc nix-info: fix error when no channel installed
The nix-info script fails when user only use flake.
This patch use the new nix CLI when old fails.
2023-01-15 09:28:20 +00:00
Silvan Mosberger
b3792b44c5 lib: correctly render docs for nested identifiers
Applies https://github.com/nix-community/nixdoc/pull/27 and fixes up the
location information rendering, allowing lib functions to be nested in
further scopes

Needed for later commits
2022-12-23 21:10:16 +01:00
maralorn
f2135573fb nix-output-monitor: 2.0.0.4 -> 2.0.0.5
https://github.com/maralorn/nix-output-monitor/releases/tag/v2.0.0.5
2022-11-28 00:33:37 +01:00
maralorn
eec3739249 nix-output-monitor: 2.0.0.3 -> 2.0.0.4
https://github.com/maralorn/nix-output-monitor/releases/tag/v2.0.0.4
2022-11-21 06:21:55 +01:00
Mario Rodas
77230193fc
Merge pull request #196347 from aaronjheng/nix-store-gcs-proxy
nix-store-gcs-proxy: use buildGoModule
2022-10-28 07:13:55 -05:00
piegames
67cd3c6b65 npins: 0.1.0 → 0.2.0 2022-10-27 23:26:11 +02:00
maralorn
22250fdc68 nix-output-monitor: 2.0.0.2 -> 2.0.0.3 2022-10-25 20:58:39 +02:00
Luna Nova
a824a8ec3e
nix-output-monitor: set meta.mainProgram
Fixes `error: unable to execute '/nix/store/arrb5j23znf00p1i0kvd9bmb7ddamlxx-nix-output-monitor-2.0.0.2/bin/nix-output-monitor': No such file or directory` with nix run
2022-10-21 17:48:24 -07:00
maralorn
0c244fd4cb nix-output-monitor: 2.0.0.1 -> 2.0.0.2 2022-10-19 01:40:48 +02:00
maralorn
7db45269d6 nix-output-monitor: 2.0.0.0 -> 2.0.0.1 2022-10-18 03:42:02 +02:00
Aaron Jheng
6154d63d4c
nix-store-gcs-proxy: use buildGoModule 2022-10-17 03:30:31 +00:00
maralorn
c76bbaa0f5 nix-output-monitor: 1.1.3.0 -> 2.0.0.0 2022-10-15 15:28:37 +02:00
Jamie Quigley
d6ed6a2b8b
alejandra: 2.0.0 -> 3.0.0
Also add self as maintainer
2022-08-16 14:31:58 +01:00
lassulus
f8ec6c6c85 nixos-generators: 1.6.0 -> 1.7.0 2022-08-11 14:20:44 +02:00
kilianar
5eb9bf5565 alejandra: 1.5.0 -> 2.0.0 2022-07-14 17:46:49 +10:00
Mario Rodas
7ca32cf434
Merge pull request #178834 from kamadorueda/alejandra-update
alejandra: 1.4.0 -> 1.5.0
2022-06-24 19:37:13 -05:00
kilianar
6eb44e6fce nar-serve: 0.4.0 -> 0.6.1 2022-06-24 10:50:56 +02:00
Kevin Amado
ba29e6d5b4
alejandra: 1.4.0 -> 1.5.0 2022-06-24 00:05:43 -06:00
Kevin Amado
6ec6afde81
nixel: init at 4.1.0 2022-06-23 15:54:39 -06:00
kilianar
970cd2643d statix: 0.5.4 -> 0.5.6 2022-06-19 21:32:01 +10:00
kilianar
2387396258 nixpkgs-fmt: 1.2.0 -> 1.3.0
- [Commits](https://github.com/nix-community/nixpkgs-fmt/compare/v1.2.0...v1.3.0)
2022-06-18 06:14:46 +02:00
lassulus
b79667a20d nixos-generators: 1.5.0 -> 1.6.0 2022-05-24 20:45:37 +02:00
Kevin Amado
27bfb7cfb9
alejandra: 1.2.0 -> 1.4.0 2022-05-19 09:39:10 -06:00
piegames
744ca87ed0 npins: Init at 0.1.0 2022-05-17 18:24:54 +02:00
Malo Bourgon
16e15fa68f treewide: add meta.mainProgram to many packages 2022-05-04 18:08:19 -07:00
Artturin
f1c7f19e49 treewide: testVersion -> testers.testVersion 2022-04-22 16:24:27 +03:00
R. Ryantm
60dc89be41 alejandra: 1.1.0 -> 1.2.0 2022-04-11 01:20:18 +00:00
Sandro
4c6ad299c1
Merge pull request #164588 from 1000101/nix-info 2022-03-23 07:50:32 +01:00
Malte Brandy
4434f53415 nix-output-monitor: 1.1.2.1 -> 1.1.3.0 2022-03-21 22:49:54 +01:00
1000101
e97d588423 nix-info: add BUILD_ID information 2022-03-17 13:16:35 +01:00
Malte Brandy
c998ef53b8 nix-output-monitor: 1.1.2.0 -> 1.1.2.1 + Refactor 2022-03-16 15:04:52 +01:00
Malte Brandy
884b37844e nix-output-monitor: 1.1.1.0 -> 1.1.2.0 2022-03-13 13:39:31 +01:00
Kevin Amado
8dadd20473
alejandra: 1.0.0 -> 1.1.0 2022-03-10 13:54:59 -05:00
Malte Brandy
5c924dc3b9 nix-output-monitor: Add zsh completion for nom-build 2022-03-09 13:15:28 +01:00
Malte Brandy
de687e6c8e nix-output-monitor: 1.0.5.0 -> 1.1.1.0 2022-03-08 14:16:48 +01:00
Malte Brandy
e8cfe80ccc nix-output-monitor: Introduce update.sh 2022-03-08 14:15:22 +01:00
Martin Weinelt
e9aa7156d9
Merge pull request #162796 from 0x4A6F/master-alejandra 2022-03-06 19:42:00 +01:00
Malte Brandy
f7e9fa8dc6 nix-output-monitor: 1.0.4.0 -> 1.0.5.0 2022-03-05 20:20:01 +01:00
0x4A6F
81da6369de
alejandra: 0.7.0 -> 1.0.0 2022-03-04 17:14:54 +01:00
Kevin Amado
232acc9c4d
alejandra: 0.6.0 -> 0.7.0 2022-02-28 19:23:27 -05:00
Kevin Amado
ab1e19e336
alejandra: 0.5.0 -> 0.6.0 2022-02-25 17:07:52 -05:00
AndersonTorres
3f19fc37a3 Move misc/vim-plugins to applications/editors/vim/plugins 2022-02-24 20:26:07 -03:00
Kevin Amado
4217504fb9
alejandra: 0.4.0 -> 0.5.0 2022-02-23 16:50:11 -05:00
Kevin Amado
0450d5dda8
alejandra: 0.3.1 -> 0.4.0 2022-02-21 19:01:41 -05:00
R. Ryantm
2bee70d513 statix: 0.5.3 -> 0.5.4 2022-02-22 04:38:37 +10:00
Kevin Amado
fa7af73685
alejandra: 0.3.0 -> 0.3.1 2022-02-20 19:16:44 -05:00
Kevin Amado
98aabc4fc9
alejandra: 0.2.0 -> 0.3.0 2022-02-18 18:41:28 -05:00
Kevin Amado
82cf11aece
alejandra: 0.1.0 -> 0.2.0 2022-02-17 02:50:20 -05:00
Kevin Amado
16298a931e
alejandra: unstable-2022-02-12 -> 0.1.0 2022-02-14 22:38:27 -05:00
Kevin Amado
1cb2d4c19f alejandra: unstable-2022-02-10 -> unstable 2022-02-12 2022-02-13 09:31:40 -08:00
Kevin Amado
be62b48247
alejandra: unstable-2022-01-30 -> unstable-2022-02-10 2022-02-10 16:12:50 -05:00
Michael Schneider
0d55e6d93a statix: v0.5.2 -> v0.5.3 2022-02-10 11:47:49 -08:00
Bobby Rong
589235201f
Merge pull request #157149 from nerdypepper/update-statix
statix: v0.4.2 -> v0.5.2
2022-01-31 21:02:54 +08:00
0x4A6F
6239d0a67c
alejandra: init at unstable 2022-01-30 2022-01-30 19:21:56 +01:00
Akshay
1eb57f1446 statix: v0.4.2 -> v0.5.2 2022-01-28 19:58:56 +05:30
figsoda
af9863fd44 statix: fix darwin build 2021-12-06 14:03:29 -05:00
Akshay
8e29102ccb statix: 0.4.1 -> 0.4.2 2021-12-04 16:09:03 +05:30
Malte Brandy
e2738be136
nix-output-monitor: 1.0.3.3 -> 1.0.4.0 2021-12-03 00:37:25 +01:00
figsoda
cda6d38346 statix: 0.4.0 -> 0.4.1 2021-11-28 14:45:48 -05:00
figsoda
64bbe7aa17 statix: use buildFeatures 2021-11-16 08:11:52 -05:00
Albert Safin
cdd3c44bfa cached-nix-shell: 0.1.4 -> 0.1.5 2021-11-14 18:29:21 +00:00
zowoq
899f2d8b7f nix-info: use stdenv.hostPlatform.system
`pkgs.system` is an alias since 4246d6ce21.
2021-11-14 11:11:15 +10:00
lassulus
7e7ce7316e nixos-generators: 1.4.0 -> 1.5.0 2021-11-08 17:24:58 +01:00