Commit graph

23 commits

Author SHA1 Message Date
Vincent Ambo
8ebfc02fb6 docs(nix-1p): clarify wording for what is an expression
See https://github.com/tazjin/nix-1p/issues/19

Change-Id: Ie78eb00192b595ffa59040a4f6d311023621939a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10737
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-02-02 16:39:44 +00:00
Vincent Ambo
da648b4707 docs(nix-1p): add section about the merge operator
Without the examples, some behaviour of the merge operator might not
be clear from the previous description. Due to how pervasively the
operator is used, I think it warrants a separate section.

This fixes https://github.com/tazjin/nix-1p/issues/16

Change-Id: Iecba5f1cb749bef0a4987b3fc5642832a92c18d5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9599
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2023-10-10 11:18:25 +00:00
Vincent Ambo
0ad059ddfe docs(nix-1p): fix formatting of operator table
Change-Id: I19a10114bf4a816e3573eb86df208b68548884a1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9598
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2023-10-10 11:18:25 +00:00
Jan Hrček
4ab0a9498f docs(nix-1p): update manual links
I found some links to nix manual are not working (they redirect me to
manual homepage and one github link led to 404 page), so I fixed all
the links for which I was able to find appropriate target.

Imported from https://github.com/tazjin/nix-1p/pull/15

Change-Id: Ie933951e9743649d7794a6bd2a82c3a0ed328336
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9501
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2023-10-01 14:19:38 +00:00
Vincent Ambo
9f762bf623 docs(nix-1p): explain scope of with
This fixes https://github.com/tazjin/nix-1p/issues/13

Due to with's use of a semicolon instead of some kind of bracing
statement, people can get confused about what the scope of a `with`
is.

Hopefully this change should make it more explicit.

Change-Id: Ifaff28e09a2e8b8b244a9c11d44b2780dee284ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8951
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2023-08-01 19:53:31 +00:00
Vincent Ambo
5b1c327c82 docs(nix-1p): suggest using nix repl to experiment with commands
This fixes https://github.com/tazjin/nix-1p/issues/14

I guess some people also don't discover the REPL for a while unless
told about it.

Change-Id: I76366c1cb02b5612a5aa87fe33b40b7bb0db3ff3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8950
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2023-07-11 16:06:23 +00:00
Vincent Ambo
09486d483c docs(nix-1p): import is a builtin, not a keyword
Pointed out by @Gaelan on GH in
https://github.com/tazjin/nix-1p/issues/12

As noted there, some Nix syntax highlighters will colour `import`
differently (e.g. the Emacs nix-mode), but it's not technically a
keyword in the language.

Change-Id: I1bbd36261cda31deb9ba47380a2810e64ba03ea1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8832
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2023-06-19 22:20:39 +00:00
vpfeiffer
55ea15ab83 docs(nix/nix-1p): Update to use final and prev
The convention has changed to use `final` instead of `self` and `prev`
instead of `super`. This new convention is much easier to understand
especially for users that are new to Nix and Nixpkgs.

This change is notable in the Nixpkgs project code. I added a note
mentioning that the official documentation hasn't been update with
this information. The documentation is currently undergoing an
overhaul and that is why I believe this hasn't been reflected in the
nixpkgs documentation as of yet.

Imported-From: https://github.com/tazjin/nix-1p/pull/9/commits
Change-Id: I901df69a564969b1784b3d7ac629cfaf85093acb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6859
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-10-05 11:14:38 +00:00
Vincent Ambo
544d72189c chore(nixery): use nix-1p from within the depot
Since the source of nix-1p is checked in under //nix/nix-1p, we should
use it from there if Nixery is being built inside of depot.

Change-Id: Iddd54f7b93b398b2f909db6ee105366a9914a2ac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5882
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2022-06-16 15:08:27 +00:00
Vincent Ambo
0d4cf119bc feat(nix-1p): Export subtree to GitHub
We needed a derivation for that, but this can also be used in the
Nixery docs building process (which includes nix-1p).

Change-Id: If97cf785a33d703af975da3b41de9b69566dfa81
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5789
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-29 12:30:49 +00:00
Vincent Ambo
a9a1a46458 Note recommended use of 'or' in override patterns
This fixes #6
2021-11-14 16:28:37 +03:00
Vincent Ambo
2a098e081b Document binding of attribute set arguments using '@'
First and foremost this is being added because it was lacking, and
nix-1p strives to have fairly complete coverage of all useful
features.

Additionally, as pointed out by @nixinator in #6 there is some
surprising behaviour around how default arguments work in combination
with '@' and I thought this was worth noting.
2021-11-14 16:20:19 +03:00
Vincent Ambo
d28d30477a Note that or works for nested attribute access 2020-11-25 13:41:38 +01:00
Vincent Ambo
3236b7ff28 Add small section about or expressions 2020-11-25 13:40:19 +01:00
Asad Saeeduddin
56a1f03a10 Fix typo in code snippet 2019-12-18 01:00:39 +00:00
Vincent Ambo
5f4664ad5a Fix rendering of pipes in code blocks across dialects
Pipes inside of code blocks inside of tables seem to pose a challenge
for some Markdown renderers. Not a problem for Github's but this page
is occasionally embedded in other documentation (such as nixery.dev)
2019-08-21 10:19:58 +01:00
Vincent Ambo
19d6d5a16c Add table with most important Nix operators 2019-08-07 16:36:28 +01:00
Louis Taylor
d113a91ae8 Fix link to nixdoc 2019-08-02 11:50:35 +01:00
Vincent Ambo
8b325cd791 Make Github's Nix highlighter happy
The highlighter expects that all code blocks are valid expressions (to
some degree) and highlights mismatches in dark red, which is not
particularly pleasant for the reader.

This introduces a "fake" attribute set in the `inherit` section to
please the highlighter.
2019-08-01 23:24:14 +01:00
Vincent Ambo
bb02b01dd0 Add Nix idioms (file lambdas, callPackage, overrides)
These are not strictly speaking language features, but my intention
for this document is that someone can - after reading it - navigate a
large chunk of existing Nix code.
2019-08-01 23:20:56 +01:00
Vincent Ambo
a2610a9b33 Add note about 'rec' in attribute sets 2019-08-01 23:20:38 +01:00
Vincent Ambo
fe3b0d3706 Point people to the issue tracker for ... issue tracking 2019-08-01 22:48:01 +01:00
Vincent Ambo
32e4cfdda4 Check in initial version of nix-1p
Adds the initial version originally published as a gist. This is
already slightly different from the gist in that it contains a section
on derivations.

This is not yet complete.
2019-08-01 22:48:01 +01:00