aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/local.mk
AgeCommit message (Collapse)Author
2024-05-07remove the autoconf+Make buildsystemQyriad
We're not using it anymore. Any leftover bugs in the Meson buildsystem are now just bugs. Closes #249. Change-Id: I0465a0c37ae819f94d40e7829f5bff046aa63d73
2024-05-03Rename `nix show-config` to `nix config show`Théophane Hufschmitt
Part of #7672 My main motivation is to be able to use `nix.checkConfig`[1]. This doesn't work with Lix currently since the module uses `nix show-config` if the Nix version is <2.20pre and `nix config show` otherwise. I think this is the only instance where nixpkgs checks for which Nix commands exist that affects us now, so I figured we could just perform the rename here as well[2] and still provide the current version number[3]. I don't have a strong opinion on whether to deprecate `nix show-config`, the warning is added there automatically. (cherry picked from commit f300e11b056dea414d7d77bbc6e5a7dc5d9ddd41) [1] https://nixos.org/manual/nixos/stable/options.html#opt-nix.checkConfig [2] I should add that I don't use the "official" ways of installing Lix because using the flake directly and callPackaging it seemed to fit better into my workflow: I already have a little mess to make sure Hydra from the flake uses the correct pkgs.nix and I didn't want to complicate it further while keeping a single package-set I can build in CI. Don't get me wrong, I think such a module for a quick-start is very important, just giving context on why I bother in the first place :) [3] When we go public, I think it's worth considering to add support in nixpkgs itself for Lix. Change-Id: I47b4239b05cbeda3c370d2fa56ea768b768768ac
2024-04-11docs: redo content generation for mdbook and manualeldritch horrors
manpages can be rendered using the markdown output of mdbook, the rest of the manual can generated out of the main doc/manual source tree. we still use lowdown to actually render manpages instead of eg mdbook-man because lowdown does generate reasonably good manpages (though that is also somewhat debatable, but they're a lot better than mdbook-man). doing this not only lets us drastically simplify the lowdown pipeline, but also remove all custom {{#include}} handling since now mdbook does all of it, even for the manpage builds. even the lowdown wrapper isn't entirely necessary because lowdown can take all wrapper arguments with command line flags rather than bits of input file content. This also implements running mdbook in Meson, in order to generate the manpages. The mdbook outputs are also installed in the usual location. Co-authored-by: Qyriad <qyriad@qyriad.me> Change-Id: I60193f9fd0f15d48872f071af35855cda2a0f40b
2024-04-09docs: put the manual build into a known tmpdireldritch horrors
this isn't strictly necessary, but it'll make it a lot easier to put the generated files used by the autoconf build system in this directory too. doing this now already will make the meson transition a lot easier later Change-Id: I5fb39eade2ff88b6093c9ee436c9e8db793e9448
2024-04-09docs: don't compute SUMMARY.md during buildeldritch horrors
this would make meson build compatibility unnecessarily hard and the cli does not change often enough to justify this complexity. Change-Id: I17b1870cdf8538feeaa01a9945db97af2175a642
2024-04-09docs: don't compute rl-next.md during buildeldritch horrors
not sure why this was done the way it was considering that includes are a feature the doc toolchain had previously. let's just always have some kind of entry for the upcoming release in the dev manual builds even if that means having a completely empty release notes chapter. the release notes generation script isn't entirely functional right now due to pre-commit hooks, but it's good enough for time being. we need a better release process for notes anyway. Change-Id: Ifda6912cf5233db013f72a30247a62d6f22b1565 Change-Id: I9eb347ec4aabc5be2b816ff0fd3e4be45f93b934
2024-04-09docs: skip do custom include processing for mdbookeldritch horrors
mdbook already does include processing of its own, and the custom processing code has always admitted as much. we don't need it for the mdbook build at this point if we run our preprocessors in the right order, and maybe we can even have mdbook to return complete pages to us that we only have to pass to lowdown without any more preprocessing of our own. Change-Id: Icd978acbc3b1e215fee8f062c53ab2cb2a222ab1
2024-04-04docs: replace sed invocation with an mdbook preprocessor for @docroot@Qyriad
We're not entirely clear on why the links preprocessor has to be done *before* rather than after, but we assume it is probably that as a builtin preprocessor it does some processing on the raw book source, and not just the JSON data. Also a real use for Python pattern matching? I know I was surprised too. Change-Id: Ibe8b59e7b5bd5f357a655d8b4c5f0b0f58a67d6b
2024-04-01doc: remove the -- unescaping hackeldritch horrors
lowdown has an option to disable this behavior. use it. Change-Id: I06d4201b7f528021ddb8e94ac6baff385402e080
2024-03-30build: extract make "functions" into scriptseldritch horrors
we'll want to use these for the meson builds, and probably eventually rewrite them in something that isn't plain shell. diffoscope confirms that out/share and doc/share are equal before and after these changes Change-Id: I49aa418fc8615cad86d67328e08c28a7405ec952
2024-03-27build: replace changelog-d with local scripteldritch horrors
hacking changelog-d to support not just github but also forgejo and gerrit is a lot more complicated than it's worth, even moreso since the entire thing can just as well be done with ~60 lines of python. this new script is also much cheaper to instantiate (being python), so having it enabled in all shells is far less of a hassle. we've also adjusted existing release notes that referenced a gerrit cl to auto-link to the cl in question, making the diff a bit bigger closes https://git.lix.systems/lix-project/lix/issues/176 Change-Id: I8ba7dd0070aad9ba4474401731215fcf5d9d2130
2024-03-05Merge pull request #5145 from fedepell/local_doc_build_5140eldritch horrors
Docs build: depend on locally built nix executable and not installed one (cherry picked from commit ca72e3e7e8f69526f028475a7a9b40812da1acdd) === includes changes from (because not doing so removes manpages): Merge pull request #9976 from alois31/restore-manual-pages Restore manual pages (cherry picked from commit d3c1997127e0fc08576e842b2bfe046d8a28d2f4) Change-Id: I685ff16163ac552a1754570c03c992c63a461d50
2024-03-04Merge pull request #9393 from hercules-ci/changelog-deldritch horrors
Automatically compile hand-written release notes with `changelog-d` (cherry picked from commit 928f0c13414d20c1af88b30bd6700fd730ee0bab) Change-Id: Ia0685835c52edf185b64dd696b19305746c077e5
2023-11-10backport fix for the `--help` outputValentin Gagarin
2023-06-27Automatically document builtin constantsJohn Ericson
This is done in roughly the same way builtin functions are documented. Also auto-link experimental features for primops, subsuming PR #8371. Co-authored-by: Eelco Dolstra <edolstra@gmail.com> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-28display documentation on manifest files separatelyValentin Gagarin
it's probably better not to show the manifest file documentation in the command-specific pages, because these are implementation details that are not really practically useful. this means no additional hassle for building the manual, but clutters the table of contents a bit.
2023-04-26Document user files of nixAlexander Bantyev
2023-04-09Single page for experimental feature descriptionsJohn Ericson
As requested by @fricklerhandwerk.
2023-04-06Describe active experimental features in the contributing guideJohn Ericson
They are put in the manual separate pages under the new overarching description of experimental features. The settings page just lists the valid experimental feature names (so people know what a valid setting entry looks like), with links to those pages. It doesn't attempt to describe each experimental feature as that is too much information for the configuration settings section.
2023-04-04Assemble experimental feature docs outside of Nix itselfJohn Ericson
Instead of constructing a markdown list in C++ (which involved all sorts of nasty string literals), export some JSON and assemble it with the manual build system. Besides following the precedent set with other dumped data, this is a better separate of content and presentation; if we decide for example we want to display this information in a different way, or in a different section of the manual, it will become much easier to do so.
2023-03-30process includes firstValentin Gagarin
otherwise the order of found `.md` files will influence if `@docroot@` is replaced before them being included, which may mess up relative links. the weirdest thing about it is that the mess-up happens deterministically on macOS, but deterministically doesn't happen on Linux!
2023-03-30Split nix-env and nix-store documentation per-subcommandAlexander Bantyev
Documentation on "classic" commands with many sub-commands are notoriously hard to discover due to lack of overview and anchor links. Additionally the information on common options and environment variables is not accessible offline in man pages, and therefore often overlooked by readers. With this change, each sub-command of nix-store and nix-env gets its own page in the manual (listed in the table of contents), and each own man page. Also, man pages for each subcommand now (again) list common options and environment variables. While this makes each page quite long and some common parameters don't apply, this should still make it easier to navigate as that additional information was not accessible on the command line at all. It is now possible to run 'nix-store --<subcommand> --help` to display help pages for the given subcommand. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-03-30Manual: fail when #include-d file does not existAlexander Bantyev
2023-03-23Make useAnchors a named argumentEelco Dolstra
2023-03-21nix store --help: Include store type documentationEelco Dolstra
2023-03-10Generate API docs with DoxygenJohn Ericson
The motivation is as stated in issue #7814: even though the the C++ API is internal and unstable, people still want it to be well documented for sake of learning, code review, and other purposes that aren't predicated on it being stable. Fixes #7814 Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-03-03cosmetic indentationValentin Gagarin
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2023-03-01Documentation: process #include directivesAlexander Bantyev
2023-03-01doc/manual/local.mk: Use tabs instead of spaces everywhereAlexander Bantyev
2023-02-07local.mk: Don't log docroot commentsRobert Hensing
These were accidentally logged and do not need to appear in make's log output.
2023-01-10doc/manual/hacking: Document @docroot@ variableRobert Hensing
2023-01-10doc/manual: Move the html files back where they were beforeRobert Hensing
... before the link checking "output" was added, bumping the html output into a subdirectory.
2023-01-10doc/manual: Introduce @docroot@ as a stable base for includable snippetsRobert Hensing
This way the links are clearly within the manual (ie not absolute paths), while allowing snippets to reference the documentation root reliably, regardless of at which base url they're included.
2023-01-10manual: Check linksRobert Hensing
mdbook-linkcheck is not consistent about its warning setting. It disables some warnings, but not the warnings about lack of fragment checking support; hence the extra filtering.
2022-12-07do not render links in man pagesValentin Gagarin
this is a follow-up on e7dcacb. most links are relative and this should not be too much of a detriment.
2022-10-07Print common flags in --helpAna Hobden
2022-08-26do not render relative links in help pagesValentin Gagarin
this simplifies the setup a lot, and avoids weird looking `./file.md` links showing up. it also does not show regular URLs any more. currently the command reference only has few of them, and not showing them in the offline documentation is hopefully not a big deal. instead of building more special-case solutions, clumsily preprocessing the input, or issuing verbal rules on dealing with URLs, should better be solved sustainably by not rendering relative links in `lowdown`: https://github.com/kristapsdz/lowdown/issues/105
2022-08-04Merge remote-tracking branch 'upstream/master' into doc-what-is-nixJohn Ericson
2022-08-04WIP: Document the design of NixJohn Ericson
The current docs are all "how to do things" and no "what is Nix" or "why are things the way they are". I see lots of misconception on the wider internet, and I also think we would benefit from a "living document" to answer some questions people currently turn to the thesis for. I think a new section of the manual can address all these issues.
2022-08-04manual: remove "Writing Nix Expressions" chapterValentin Gagarin
it is out of date, all over the place in level of detail, is really about `nixpkgs`, and in general instructions should not be part of a reference manual. also: - update redirects and internal links - use "Nix language" consistently
2022-05-26doc: Port anchors preprocessor to jq scriptJan Tojnar
Python is only pulled into the build closure by Mercurial, which might end up being removed. Let’s port the script to jq, which is more likely to stay.
2022-05-26doc: Introduce pre-processor for adding anchors to textJan Tojnar
It is now possible to use the following syntax to insert anchors into the text: []{#anchor-name} The anchor will allow linking to the location it is placed by appending #anchor-name to the URL. Additionally, it is possible to create a link pointing to its own location by adding text between the square brackets: [`--add-root`]{#opt-add-root}
2022-02-23Add html make targetGuillaume Desforges
2021-11-26reproducibility: determinstic man page output for coresTom Bereknyei
2021-10-06Remove links to .md files in help outputEelco Dolstra
Fixes #5337.
2021-09-22QuietEelco Dolstra
2021-09-13nix --help: Display help using lowdown instead of manEelco Dolstra
Fixes #4476. Fixes #5231.
2021-09-09Manual: Depend on all *.md filesEelco Dolstra
2021-08-28doc/manual/local.mk: fix 'make install DESTDIR=...'Sergei Trofimovich
Install failure is observed when we try to install into inplace location as non-root: ``` $ LANG=C make install DESTDIR=$PWD/__i__ V=1 RUST_LOG=warn mdbook build doc/manual -d /usr/share/doc/nix/manual 2021-08-28 13:29:58 [ERROR] (mdbook::utils): Error: Rendering failed 2021-08-28 13:29:58 [ERROR] (mdbook::utils): Caused By: Unexpected error when constructing destination path 2021-08-28 13:29:58 [ERROR] (mdbook::utils): Caused By: Permission denied (os error 13) make: *** [doc/manual/local.mk:98: /usr/share/doc/nix/manual/index.html] Error 101 ``` The change is to prefix paths with `$(DESTDIR)`.
2021-08-05Merge pull request #5094 from Pamplemousse/simpler_docEelco Dolstra
doc/manual: don't need to copy `highlight.js` manually