Commit Graph

75 Commits

Author SHA1 Message Date
Silvan Mosberger
54a93d0525
Merge pull request #312407 from hsjobeki/doc/lib-generators
doc: init lib.generators reference documentation
2024-06-26 22:09:05 +02:00
Silvan Mosberger
3da97e2163 doc: Prevent unnecessary rebuilds
Especially when only Nix files are changed
2024-06-15 16:35:12 +02:00
Silvan Mosberger
b59560c3f8 doc: Use build-time to insert dynamic python interpreter table
Nix eval isn't made to patch stuff, it's more flexible to do it at build
time
2024-06-15 16:35:12 +02:00
Alejandro Sánchez Medina
0cb4674319
doc: autogenerate python interpreter table (#313408)
* doc: autogenerate python interpreter table

This serves as a practical example on generating documentation by
inspection of the evaluated Nixpkgs tree.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-23 10:36:15 +02:00
Johannes Kirschbauer
8ee634f5a6
doc: init lib.generators reference documentation 2024-05-21 21:54:47 +02:00
Jan Tojnar
499f723873 doc: Use substitute --replace-fail in manuals
This fixes a warning about --replace being deprecated.
2024-05-02 23:19:15 +02:00
Daniel Sidhion
a1581a3647
doc: fix and simplify stylesheets for the manuals, fix nrd bug (#295847)
* doc: fix and simplify stylesheets for the manuals, fix nrd bug

* Add anchorjs script to add links on section headers

* Fix another nrd bug, address style changes

* Use span instead of a for inline span syntax
2024-03-16 20:16:59 +01:00
Shea Levy
ca1262a483
lib: Add optionalDrvAttr to conditionally set drv attributes.
This allows for adding new, conditionally set, derivation attributes
to an existing derivation without changing any output paths in the
case where the condition is not met.
2024-02-02 16:27:30 -05:00
nicoo
b1a96bbbf2 doc: Add test for broken links in manpage-urls.json 2023-12-18 20:28:51 +00:00
Andreas Fuchs
0cdbf88f83 doc: Add lib.meta to the library functions ToC
This seems like a pretty easy-to-fix oversight, and it documents the
getExe function, which I never knew about until one day I saw a PR
using it. Let's include it in the manual.
2023-11-04 11:24:19 -04:00
Yueh-Shun Li
a8d5d2f207 doc: generate documentation for lib.customisation 2023-10-20 20:58:47 +08:00
Silvan Mosberger
d66929b7b1
Merge pull request #245623 from tweag/fileset.toSource
File set combinators base: `lib.fileset.toSource`
2023-09-02 04:07:02 +02:00
Silvan Mosberger
465e05c0c5 lib.fileset.toSource: init 2023-09-01 15:46:04 +02:00
linsui
da614d98e9 lib/gvariant: init 2023-08-15 19:20:39 +08:00
Alejandro Sanchez Medina
13aeddb926 nixpkgs manual: extract some build paths
Co-authored-by: Shahar "Dawn" Or <mightyiampresence@gmail.com>
2023-07-25 17:00:51 +07:00
Robert Hensing
aa1beb0ab5 doc: Render lib.fixedPoints 2023-07-08 18:46:08 +02:00
pennae
fc1b58b593 doc: inline doc-support to main drv
separating function docs out like this makes it less clear how library
documentation is generated and integrated into the build. if in the
future more parts of nixpkgs use nixdoc it will make sense to have all
information about library doc generation in the same place.
2023-07-01 20:59:30 +02:00
pennae
70cbd8c6c0 doc: pull option docs out of doc-support
this leaves doc-support as a simple wrapper around function docs. this
wrapper will go away very soon as well.
2023-07-01 20:59:30 +02:00
pennae
f397309f4e doc: remove remnants of docbook times
all xml-related tooling can go away. shell.nix is no longer useful since
the makefile is gone and the build runs entirely via a derivation, and
gitignore is thus also no longer that useful. it may filter out some
swap files, but its main reason to exist (keeping generated files out of
a concurrent build of the derivation) has gone away.
2023-07-01 20:59:30 +02:00
pennae
be4d19ff1a doc: render nixpkgs manual with nrd
also updates nixdoc to 2.3.0. the nixdoc update is not a separate commit
because that would leave the manual build broken for one commit,
potentially breaking bisects and rebases.
2023-07-01 20:59:29 +02:00
pennae
a5414c29a0 doc: build placeholder epub in its own derivation
mostly to clean up the main manual build makefile and derivation a bit.
not technically necessary, but will make life easier later.
2023-07-01 20:27:29 +02:00
pennae
c415521d63 doc: stub out epub manual
same reasoning as for the nixos manual.
2023-06-12 17:50:52 +02:00
Adam Joseph
ed312cb4f7
doc/default.nix: make the manual build on more than one core (#225921)
* doc/default.nix: make the manual build on more than one core

Let's build the manual with more than one core.  Maybe people will take better care of it now that it is less painful to build.
2023-04-25 14:37:50 +02:00
Naïm Favier
5a5decd2eb
doc: use gitignoreSource
Running `make -C doc` to build the manual locally leaves .xml artifacts
in the tree. These are ignored by git, but they still get included in
the build when not using flakes, which causes the corresponding chapters
not to be built.
2023-02-07 13:58:34 +01:00
Naïm Favier
a8d4cf149c
doc: separate manpage URLs from the Pandoc filter
Move the manpage-to-URL mapping to `doc/manpage-urls.json` so that we can
reuse that file elsewhere, and generate the `link-manpages.lua` filter from
that file.

Also modify the Pandoc filter so that it doesn't wrap manpages that are
already inside a link.

Keeping a Lua filter is essential for speed: a Python filter would
increase the runtime `md-to-db.sh` from ~20s to ~30s (but Python is not
to blame; marshalling Pandoc types to and from JSON is a costly operation).
Parsing in Lua seems tedious, so I went with the Nix way.
2023-01-02 14:11:22 +01:00
Jan Tojnar
7497b4721c doc: Fix make in nix-shell
When running make manually, makeFlags will not be passed. Let’s just use an environment variable.
2021-06-05 13:25:48 +02:00
Alyssa Ross
503a772e02 doc: use lib.cleanSource
Otherwise, running "nix-build" in the doc directory would create a
result symlink, so running "nix-build" again would produce a different
derivation, and so on forever, because the result symlink would keep
changing and wasn't ignored.
2021-02-12 08:59:27 -08:00
Jan Tojnar
ba11a96653
doc: Add staging workflow diagram 2020-12-09 05:26:55 +01: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
Vincent Ambo
0c99dac497 doc: Add automatic generation of library function documentation
Modifies the build process of the manual to invoke nixdoc
automatically to generate XML files with function documentation.

Currently documentation is present for five of the files in `lib/`.

To add another file to the generated docs, both
`doc/functions/library.xml` and `doc/lib-function-docs.nix` must be
updated.
2019-01-04 11:28:27 +01:00
Graham Christensen
5daee73ce4
Generate links to function definitions
Hydra passes the full revision in to the input, which we pass through.

If we don't get this ,we try to get it from other sources, or default to
master which should have the definition in a close-ish location.

All published docs should have theURL resolve properly, only local
hackers will have the link break.
2018-10-05 11:20:46 -04:00
Frederik Rietdijk
1a6af9f88e
Merge pull request #43857 from volth/unused
[bot] treewide: remove unreferenced code
2018-07-20 21:06:32 +02:00
volth
87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
Matthew Bauer
76999cc40e treewide: remove aliases in nixpkgs
This makes the command ‘nix-env -qa -f. --arg config '{skipAliases =
true;}'’ work in Nixpkgs.

Misc...

- qtikz: use libsForQt5.callPackage

  This ensures we get the right poppler.

- rewrites:

  docbook5_xsl -> docbook_xsl_ns
  docbook_xml_xslt -> docbook_xsl

diffpdf: fixup
2018-07-18 23:25:20 -04:00
Daiderd Jordan
75601e10cb manual: make epub a build product on hydra (#41475) 2018-06-06 22:36:17 +02:00
Graham Christensen
ab1648bf0d
nixpkgs doc: add format Make target 2018-04-30 22:37:58 -04:00
Maximilian Bosch
9274ea3903
treewide: rename version attributes
As suggested in https://github.com/NixOS/nixpkgs/pull/39416#discussion_r183845745
the versioning attributes in `lib` should be consistent to
`nixos/version` which implicates the following changes:

* `lib.trivial.version` -> `lib.trivial.release`
* `lib.trivial.suffix` -> `lib.trivial.versionSuffix`
* `lib.nixpkgsVersion` -> `lib.version`

As `lib.nixpkgsVersion` is referenced several times in `NixOS/nixpkgs`,
`NixOS/nix` and probably several user's setups. As the rename will cause
a notable impact it's better to keep `lib.nixpkgsVersion` as alias with
a warning yielded by `builtins.trace`.
2018-04-28 14:23:53 +02:00
Graham Christensen
8dac5ce146
nixpkgs docs: syntax highlight 2018-03-26 21:44:24 -04:00
Graham Christensen
da17974541
Move the overridden CSS to overrides.css which can be applied on nixos.org 2018-03-26 14:45:00 -04:00
Graham Christensen
a80856cec5
nixpkgs docs: Use SVGs for callouts 2018-03-26 14:08:36 -04:00
Graham Christensen
30dd2d3feb
Validate when building outputs 2018-03-25 19:52:08 -04:00
Graham Christensen
7e25ff7106
docs: Build with a makefile 2018-03-25 19:52:07 -04:00
Graham Christensen
92d53362d4
Move all nixpkgs doc files in to the doc directory
This makes a makefile-driven developer workflow nicer.
2018-03-25 19:52:00 -04:00
Joachim Schiele
f41a3e7d7d
Emscripten 1.37.16 to 1.37.36 (#37291)
* trying to build emscriptenPackages not all fail

* reading the console.log it turns out python executable is not in place and that is why emconfigure didnt work

* backup commit

* much more targets are compiling now

* added common revisioning

* revision bump to 1.37.36 (not tested)

* fixed xmllint

* forcing unit testing, will implement the tests after i get home

* json_c test working

* added tests

* tiny fixes

* added documentation
2018-03-18 13:34:46 +01:00