Commit graph

34 commits

Author SHA1 Message Date
Eelco Dolstra
38b90c618f
Merge pull request #7640 from marceltransier/patch-2
Fix update operator usage in operators.md
2023-01-19 11:12:10 +01:00
Marcel Transier
8b9325ec4a
Fix update operator usage in operators.md 2023-01-19 10:20:41 +01:00
Marcel Transier
9141b74eb7
Fix markdown error in operators.md
Escape logical or pipe in markdown table according to https://github.github.com/gfm/#example-200
2023-01-18 22:34:49 +01:00
Valentin Gagarin
e57165b85a bring back table, extract annotations
this makes the table less unwieldy, and leaves enough space for
extensive explanations.
2023-01-05 15:16:16 +01:00
Valentin Gagarin
7da59e94ae add links to documentation for data types 2023-01-05 14:15:01 +01:00
Valentin Gagarin
7b2b9e3648 use more self-explanatory placeholder names 2023-01-05 14:15:01 +01:00
Valentin Gagarin
969e5ad5bf add semantics of overloaded + operator 2023-01-05 14:15:01 +01:00
Valentin Gagarin
63b640e0c2 reword descriptions of operators
add notes on semantics where appropriate
2023-01-05 14:15:01 +01:00
Valentin Gagarin
e07448ba6b convert table to subsections
this form is much easier to maintain (also with minimal diffs), and
allows for more details on each operator.

this change a purely mechanical transformation, without changing any contents.
2023-01-05 14:15:01 +01:00
Valentin Gagarin
caebe4112e reorder columns
this is for a simpler transformation into a series of subsections
2023-01-05 14:15:01 +01:00
Valentin Gagarin
e0c4a95611 antiquotation -> string interpolation
as proposed by @mkaito[1] and @tazjin[2] and discussed with @edolstra
and Nix maintainers

[1]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270076332
[2]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270201979

Co-authored-by: John Ericson <git@JohnEricson.me>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-02 14:38:57 +01:00
Valentin Gagarin
52f0c80917 fix error in language overview
it is not possible to antiquote numbers.
2022-11-22 10:36:21 +01:00
Valentin Gagarin
ffca3e34cb
Merge pull request #6906 from fricklerhandwerk/language-overview
add syntax overview from NixOS manual
2022-11-09 00:52:53 +01:00
Valentin Gagarin
f7ab93b068 manual: build action -> build task
after discussing this with multiple people, I'm convinced that "build
task" is more precise: a derivation is not an action, but inert until it
is built. also it's easier to pronounce.

proposal: use "build task" for the generic concept "description of how
to derive new files from the contents of existing files". then it will
be easier to distinguish what we mean by "derivation" (a specific data
structure and Nix language value type) and "store derivation" (a
serialisation of a derivation into a file in the Nix store).
2022-11-06 13:28:18 +01:00
Johan Herland
1ec8810687 Explain how Nix handles antiquotation of paths
Specifically, explain why Nix does not _re_evaluate paths during a
`nix repl` session. This is a thing that bit me while playing around
with paths and antiquotation in `nix repl` while reading the Nix
language tutorial at https://nix.dev/tutorials/nix-language.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-10-19 11:50:58 +02:00
Valentin Gagarin
f35b3aa47b do not use unwarranted pkgs in example 2022-08-31 09:16:37 +02:00
Valentin Gagarin
703b335c1d reword description of language properties
the list style is supposed to give more structure.
each property is explained as concisely as possible while trying not to
sound too fancy.
2022-08-15 11:34:39 +02:00
Valentin Gagarin
71e9c28694 reword introduction to overview 2022-08-15 11:15:03 +02:00
Valentin Gagarin
bc315326fa fix whitespace to please markdown
keep some indentation to ease source readability
2022-08-15 11:13:05 +02:00
Valentin Gagarin
6ba8d6dc82 add more examples on string interpolation 2022-08-15 11:06:40 +02:00
Valentin Gagarin
c209e6e108 add more list examples 2022-08-15 10:18:56 +02:00
Valentin Gagarin
0378531bf2 add curried function 2022-08-15 10:18:56 +02:00
Valentin Gagarin
2e4704ca93 add second @ pattern example 2022-08-15 10:18:56 +02:00
Valentin Gagarin
5c25bdee50 add null 2022-08-15 10:18:56 +02:00
Valentin Gagarin
391fd10b12 add home path 2022-08-15 10:18:56 +02:00
Valentin Gagarin
587ae9ada5 add search path 2022-08-15 10:18:56 +02:00
Valentin Gagarin
21438acc70 add absolute path 2022-08-15 10:18:56 +02:00
Valentin Gagarin
e6f7c180de add floating point number 2022-08-15 10:18:56 +02:00
Valentin Gagarin
292cab039d add multi-line string 2022-08-15 10:18:56 +02:00
Valentin Gagarin
f165a8ae08 flarify relative path semantics 2022-08-15 10:18:56 +02:00
Valentin Gagarin
43188d3d18 make hash and version distinguishable as placeholder 2022-08-15 10:18:56 +02:00
Valentin Gagarin
90836397d3 remove stale section link 2022-08-15 10:18:56 +02:00
Valentin Gagarin
3378a3bce8 add syntax overview from NixOS manual
taken verbatim to keep track of required corrections.

made it an HTML table to more easily change structure and keep diffs
minimal.
2022-08-15 10:18:56 +02:00
Valentin Gagarin
499ed26508 manual: remove "Writing Nix Expressions" chapter
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-08-04 11:59:25 +02:00