aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/language
AgeCommit message (Collapse)Author
2024-08-17libexpr: Deprecate URL literalspiegames
Closes #437. Change-Id: I9f67fc965bb4a7e7fd849e5067ac1cb3bab064cd
2024-08-08libexpr: Add experimental pipe operatorpiegames
The |> operator is a reverse function operator with low binding strength to replace lib.pipe. Implements RFC 148, see the RFC text for more details. Closes #438. Change-Id: I21df66e8014e0d4dd9753dd038560a2b0b7fd805
2024-08-07Merge "fix: warn and document when advanced attributes will have no impact ↵Maximilian Bosch
due to __structuredAttrs" into main
2024-08-04misc docs/meson tidyingJade Lovelace
The docs page has an incorrect escape that leads to a backslash appearing in output. Meson stuff is self-explanatory, just shortens and simplifies a bit. Change-Id: Ib63adf934efd3caeb82ca82988f230e8858a79f9
2024-08-03fix: warn and document when advanced attributes will have no impact due to ↵Tom Bereknyei
__structuredAttrs Backport of https://github.com/NixOS/nix/pull/10884. Change-Id: I82cc2794730ae9f4a9b7df0185ed0aea83efb65a
2024-07-18Merge changes Ib20e9aa0,I178a038b,I29c7de04 into mainjade
* changes: docs: document the actual comparison rules instead of lies daemon: remove workaround for macOS kernel bug that seems fixed daemon: fix a crash bug "FATAL: exception not rethrown"
2024-07-17doc/manual: clarify documentation related to the `$$` parser bugAlois Wohlschlager
Due to a mistake in the grammar, a dollar character implicitly escapes a second dollar character that immediately follows, so that it cannot start an interpolation. Unfortunately, this behaviour has since come to be relied upon, so it cannot be fixed. Furthermore, the documentation on regular strings did not mention this behaviour at all, while in the case of indented strings it was rather implicit. Mention it explicitly in both cases, and describe how an interpolation can follow a dollar character (namely, by escaping that). Since we have to touch that section anyway, state that any character (other than n, r, and t; but notably including `$` even if not succeeded by `{`) can be escaped using a backslash in regular strings. Change-Id: I7e5d68a9a4130eec98ce8218b485168f4b31a677
2024-07-13docs: document the actual comparison rules instead of liesJade Lovelace
Although the comparison rules are ugly and we do not like various parts of them, we must not hide them away for only catgirls to know about, so the documentation should actually say how they work. Change-Id: Ib20e9aa0e7b6486ade4f401035aafd85fbb08c91
2024-07-13docs: update to define integer overflowJade Lovelace
Change-Id: Ie8a1b31035f2d27a220e5df2e9e178ec3b39ee68
2024-05-28document context-dependent keywordsstuebinm
Documents some of the weirdness of __curPos and the or keyword. This does not fit well into any existing section for either of them, though the use of or as a quasi-operator is mentioned in the section on operators. Addresses https://git.lix.systems/lix-project/lix/issues/353 Change-Id: I7c906c8368843dca6944e8b22573b6d201cd9a76
2024-05-22release notes: add a bunch of themJade Lovelace
Also fix typos introduced by the commits I read. I have run the addDrvOutputDependencies release note past Ericson since I was confused by what the heck it was doing, and he was saying it was reasonable. Change-Id: Id015353b00938682f7faae7de43df7f991a5237e
2024-05-05Fix the pages in the manual for LixJade Lovelace
This doesn't comprehensively fix everything outdated in the manual, or make the manual greatly better, but it does note down where at least jade noticed it was wrong, and it does fix all the instances of referencing Nix to conform to the style guide to the best of our ability. A lot of things have been commented out for being wrong, and there are three types of FIXME introduced: - FIXME(Lix): generically Lix needs to fix it - FIXME(Qyriad): re https://git.lix.systems/lix-project/lix/issues/215 - FIXME(meson): docs got outdated by meson changes and need rewriting I did fix a bunch of it that I could, but there could certainly be mistakes and this is definitely just an incremental improvement. Fixes: https://git.lix.systems/lix-project/lix/issues/266 Change-Id: I5993c4603d7f026a887089fce77db08394362135
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-03-29Add `pre-commit` checksRebecca Turner
The big ones here are `trim-trailing-whitespace` and `end-of-file-fixer` (which makes sure that every file ends with exactly one newline character). Change-Id: Idca73b640883188f068f9903e013cf0d82aa1123
2024-03-07Merge pull request #9032 from Ma27/structured-attrs-env-varseldritch horrors
structured attrs: improve support / usage of NIX_ATTRS_{SH,JSON}_FILE (cherry picked from commit 3c042f3b0b0a7ef9c47bf049f5410dbd4aac9e90) Change-Id: I7e41838338ee1edf31fff6f9e354c3db2bba6c0e
2024-03-04Merge pull request #8047 from lovesegfault/always-allow-substituteseldritch horrors
feat: add always-allow-substitutes (cherry picked from commit da2b59a08878b3c6c7074595e3b6d26b6928b4c1) Change-Id: I50481cd8fe643c673c610fec28bad84519a4d650
2023-08-31add anchor to `builder`Valentin Gagarin
2023-08-07Stabilize `discard-references`Théophane Hufschmitt
It has been there for a few releases now (landed in 2.14.0), doesn't seem to cause any major issue and is wanted in a few places (https://github.com/NixOS/nix/pull/7087#issuecomment-1544471346).
2023-07-19clarify wording on args@ default handling (#8596)Valentin Gagarin
* clarify wording on args@ default handling Most importantly use shorter sentences and emphasize the key point that defaults aren't taken into account Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: John Ericson <git@JohnEricson.me>
2023-07-16Nix Reference Manual: keep nix expressions uptodate with nixpkgs (#8703)Sinan Mohd
2023-06-30doc: TypoRobert Hensing
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-06-27Don't say this when we still pollute the global scopeJohn Ericson
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-06-27Switch example to a primop this is less ill-advisedJohn Ericson
Any primop will do for this, so might as well use one that isn't impure. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-06-15make domain-specificity more specificValentin Gagarin
also slightly reword the purpose statement to introduce (and explain) derivations right away.
2023-06-08refine wording on the purpose of the Nix languageValentin Gagarin
packages and configurations are not really a concept in Nix or the Nix language. the idea of transforming files into other files clearly captures what it's all about, and the new phrasing should make the term "derivation" more obvious both in terms of meaning and origin.
2023-06-02Merge pull request #8317 from fricklerhandwerk/doc-identifierThéophane Hufschmitt
document identifier syntax for attribute sets
2023-05-17add cross-references to pure evaluation modeValentin Gagarin
use consistent wording everywhere. add some details on the configuration option documentation.
2023-05-17document `builtins.currentTime`Valentin Gagarin
2023-05-17document identifier syntax for attribute setsValentin Gagarin
it's more likely for readers to find it right there. this also slightly rewords examples to make them stand out better. in the long run there probably needs to be a dedicated section on formal syntax, and better highlighting of examples.
2023-05-12Describe the or operation on attribute sets slightly moreAna Hobden
2023-05-11reword introduction to built-in functionsValentin Gagarin
add anchor to `builtins.derivation` and list some built-in functions that are exposed in the global scope. I decided not to list everything, because we probably don't want to encourage people using them that way.
2023-05-11reword documentation on `builtins`Valentin Gagarin
- add anchor to `builtins` - add type information - reword description of `builtins` to offer more information concisely
2023-05-11do not indent markdown listValentin Gagarin
2023-04-14Start cross-referencing experimental featuresJohn Ericson
- Create a glossary entry for experimental features. - Have the man page experimental feature notice link `nix-commmand`. (Eventually this should be programmed, based on whether the command is experimental, and if so what experimental feature does it depend on.) - Document which installables depend on which experimental features. I tried to use the same style (bold warning and block quote) that the top of the man page uses. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
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-22doc: force line breaks where neededValentin Gagarin
2023-03-13Fix a typo of values.mdwzy
2023-02-10Fix minor syntax issue in the one of the examples.Pico Geyer
Attribute set expressions need to end with a ;
2023-02-07Merge pull request #7700 from iFreilicht/patch-1Valentin Gagarin
docs: Fix small formatting errors
2023-02-07docs: Fix formatting of || operatorFelix Uhl
This is a workaround for [mdBook#2000](https://github.com/rust-lang/mdBook/issues/2000)
2023-02-07docs: Fix broken anchor linkFelix Uhl
2023-02-07doc: fixup 7714Naïm Favier
2023-01-30doc: add `__structuredAttrs`, `outputChecks`, `unsafeDiscardReferences`Naïm Favier
2023-01-30Merge branch 'master' into referenceablePathsThéophane Hufschmitt
2023-01-20doc: fix update operator descriptionFlorian Paul Schmidt
2023-01-19Merge pull request #7629 from phip1611/patch-3Valentin Gagarin
2023-01-19doc: update language/index.mdPhilipp Schuster
- make `<nixpkgs>` visible (was blank in the rendered version)
2023-01-19Merge pull request #7640 from marceltransier/patch-2Eelco Dolstra
Fix update operator usage in operators.md
2023-01-19Fix update operator usage in operators.mdMarcel Transier