3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

32 commits

Author SHA1 Message Date
Robert Hensing 8054785157 lib/modules: Move class out of specialArgs 2023-05-06 18:32:58 +02:00
Robert Hensing 79703eef08 nixos,nixpkgs: Add module classes
This allows modules that declare their class to be checked.
While that's not most user modules, frameworks can take advantage
of this by setting declaring the module class for their users.
That way, the mistake of importing a module into the wrong hierarchy
can be reported more clearly in some cases.
2023-05-06 18:29:04 +02:00
Silvan Mosberger 019fd45537 doc: Fix the function locations always pointing to master
Instead of revisions as they should. This is (most-likely) caused by a
simple typo, because Hydra is where the revision should come from, but
it doesn't set `.revision` as the attribute, but rather `.rev`!
2023-04-13 20:33:39 +02:00
pennae bfc6975cbc nixos/manual: remove holdovers from docbook times
these files provided mainly or exclusively xml-related tooling and
support for editing the manual. since docbook is now an implementation
detail (except for still being allowed in option docs, for now) these
tools are no longer necessary, useful, or even functional.

xmlformat.conf is still used by the nixpkgs documentation, so we have to
keep it. there's no reason it can't go live with the nixpkgs docs though.
2023-02-12 14:23:38 +01:00
Silvan Mosberger 98fbcf1788 lib.path.subpath.isValid: init
The first path library function
2023-01-03 13:20:36 +01:00
Silvan Mosberger 8496683ec9 lib: Allow doc rendering for lib/<name>/default.nix 2022-12-23 21:10:43 +01: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
Naïm Favier 5782c3d802
doc/lib-functions: print libset name before description 2022-12-22 11:31:11 +01:00
Naïm Favier ce952286ca
doc/lib-functions: preserve libsets order 2022-12-22 11:31:11 +01:00
Naïm Favier e1bb8f1e74
doc/lib-functions: add versions, cli 2022-12-22 11:31:11 +01:00
Naïm Favier 8906aa28e4
doc/lib-functions: remove warnings
Building the nixpkgs manual currently triggers a bunch of deprecation
warnings, because every attribute in `lib` is evaluated to see if it's
an attrset to generate locations for.

Instead, share the lib subsets to include in the documentation
between `lib-function-docs` and `lib-function-locations` so they can
coordinate.

Also generate the list of sections instead of duplicating it in
`library.xml`.
2022-12-22 11:31:08 +01:00
figsoda 403e25e3e3 doc: fix typos 2022-12-17 18:21:48 -05:00
Robert Hensing c23666473c doc: Remove all section numbers
Simplicity.

We use anchors nowadays. Nobody should be printing this.
2022-12-12 13:04:39 +01:00
Ryan Mulligan ac1ae0a58e doc: auto-generate asserts and attrset library docs
If all the docs are auto-generated, it should be easier to convert
them to Commonmark.

Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
2022-12-08 22:58:22 +01:00
Anderson Torres 4b59590ac5
Revert "lib,doc: remove obvious usages of toString on paths" 2022-11-05 21:57:23 -03:00
Artturin 66cf79f282 lib,doc: remove obvious usages of toString on paths
It gives a warning on the lazy-trees branch of Nix
(NixOS/nix#6530)

one of these was also giving me an error (the one in lib/trivial probably)

```
$ nix build
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd
-image-aarch64.nix' and then accessing it is deprecated, at /home/artturin/nixgits/my-nixpkgs/lib/modules.
nix:349:99
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/.git' and then accessing it is dep
recated, at /home/artturin/nixgits/my-nixpkgs/lib/sources.nix:35:32
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc.nix'
and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc-activ
ation.nix' and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd
-image-aarch64.nix' and then accessing it is deprecated, at «stdin»:0
error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source'
(use '--show-trace' to show detailed location information)
```
2022-11-06 00:00:39 +02:00
Silvan Mosberger 9bfc4bbd63 lib: Automatically generate lib.filesytem docs 2022-10-26 15:10:47 +02:00
Arnout Engelen 10670b0b96
nixpkgs/doc: generate consistent docbook ids
to make diff'ing different versions of the generated docs less noisy
2022-07-28 20:08:25 +02:00
Robert Hensing 11b33fcdcc doc: Fix config options reference file links 2022-06-15 00:45:05 +02:00
Robert Hensing e40d2099d2 doc: Add Nixpkgs config options reference 2022-05-02 10:21:05 +02:00
Robert Hensing 4a025692d1 lib.sources: Generate docs 2021-05-29 16:03:54 +02:00
Florian Klink 855a12eacf Revert "make-tarball.nix: Restore the 'commit' field in packages.json"
This reverts commit 5e8545e723.

It breaks eval:

attribute 'rev' missing, at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-0-gleber.ewr1.nix.ci/pkgs/top-level/make-tarball.nix:106:39
2020-03-29 20:57:50 +02:00
Eelco Dolstra 5e8545e723
make-tarball.nix: Restore the 'commit' field in packages.json
Also change incorrect 'revision' to 'rev' in the default value for
'nixpkgs' in release.nix.

Fixes https://github.com/NixOS/nixos-homepage/issues/372.
2020-03-29 20:16:07 +02:00
Frederik Rietdijk 95dfbe2d63 doc: organize chapters into parts, and reduce toc depth
Reorganize the chapters into parts and reduce the TOC depth to make the
TOC useful again. The top-level TOC is very brief, but that is fine
because every part will have its own TOC.

Section titles of languages/frameworks are also simplified to just
the name of the language/framework.
2019-10-20 13:35:04 +02:00
volth 35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Graham Christensen fa47df6174
doc: move parameters to an XML file 2019-07-04 09:16:06 -04:00
Graham Christensen 5a0696f6d0
xmlformat.conf: move to doc-support build 2019-07-04 09:10:14 -04:00
Graham Christensen de58e706f9
docs: Get highlightjs from build symlink 2019-07-04 09:10:14 -04:00
Graham Christensen 35262ba6a7
docs: get XSL from build / symlink 2019-07-04 09:10:13 -04:00
Graham Christensen e65c2c6672
docs: find docbook rng from doc-support 2019-07-04 09:10:13 -04:00
Graham Christensen d11f5a9d15
docs: get version from doc-support build 2019-07-04 09:10:13 -04:00
Graham Christensen cd6bf8aa00
docs: use a single nix-build for all the generate function docs 2019-07-04 09:07:47 -04:00