Skip to content

Commit 0638370

Browse files
authored
Merge pull request #135 from DeterminateSystems/sync-2.30.0
Sync with upstream 2.30.0
2 parents 81672fe + 175406c commit 0638370

File tree

284 files changed

+9092
-4147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+9092
-4147
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ result-*
4747
.DS_Store
4848

4949
flake-regressions
50+
51+
# direnv
52+
.direnv/

.mergify.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,14 @@ pull_request_rules:
139139
labels:
140140
- automatic backport
141141
- merge-queue
142+
143+
- name: backport patches to 2.29
144+
conditions:
145+
- label=backport 2.29-maintenance
146+
actions:
147+
backport:
148+
branches:
149+
- "2.29-maintenance"
150+
labels:
151+
- automatic backport
152+
- merge-queue

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.29.1
1+
2.30.0

doc/manual/source/SUMMARY.md.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
- [Tuning Cores and Jobs](advanced-topics/cores-vs-jobs.md)
5353
- [Verifying Build Reproducibility](advanced-topics/diff-hook.md)
5454
- [Using the `post-build-hook`](advanced-topics/post-build-hook.md)
55+
- [Evaluation profiler](advanced-topics/eval-profiler.md)
5556
- [Command Reference](command-ref/index.md)
5657
- [Common Options](command-ref/opt-common.md)
5758
- [Common Environment Variables](command-ref/env-common.md)
@@ -147,6 +148,7 @@
147148
- [Release 3.0.0 (2025-03-04)](release-notes-determinate/rl-3.0.0.md)
148149
- [Nix Release Notes](release-notes/index.md)
149150
{{#include ./SUMMARY-rl-next.md}}
151+
- [Release 2.30 (2025-07-07)](release-notes/rl-2.30.md)
150152
- [Release 2.29 (2025-05-14)](release-notes/rl-2.29.md)
151153
- [Release 2.28 (2025-04-02)](release-notes/rl-2.28.md)
152154
- [Release 2.27 (2025-03-03)](release-notes/rl-2.27.md)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Using the `eval-profiler`
2+
3+
Nix evaluator supports [evaluation](@docroot@/language/evaluation.md)
4+
[profiling](<https://en.wikipedia.org/wiki/Profiling_(computer_programming)>)
5+
compatible with `flamegraph.pl`. The profiler samples the nix
6+
function call stack at regular intervals. It can be enabled with the
7+
[`eval-profiler`](@docroot@/command-ref/conf-file.md#conf-eval-profiler)
8+
setting:
9+
10+
```console
11+
$ nix-instantiate "<nixpkgs>" -A hello --eval-profiler flamegraph
12+
```
13+
14+
Stack sampling frequency and the output file path can be configured with
15+
[`eval-profile-file`](@docroot@/command-ref/conf-file.md#conf-eval-profile-file)
16+
and [`eval-profiler-frequency`](@docroot@/command-ref/conf-file.md#conf-eval-profiler-frequency).
17+
By default the collected profile is saved to `nix.profile` file in the current working directory.
18+
19+
The collected profile can be directly consumed by `flamegraph.pl`:
20+
21+
```console
22+
$ flamegraph.pl nix.profile > flamegraph.svg
23+
```
24+
25+
The line information in the profile contains the location of the [call
26+
site](https://en.wikipedia.org/wiki/Call_site) position and the name of the
27+
function being called (when available). For example:
28+
29+
```
30+
/nix/store/x9wnkly3k1gkq580m90jjn32q9f05q2v-source/pkgs/top-level/default.nix:167:5:primop import
31+
```
32+
33+
Here `import` primop is called at `/nix/store/x9wnkly3k1gkq580m90jjn32q9f05q2v-source/pkgs/top-level/default.nix:167:5`.

doc/manual/source/command-ref/nix-channel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ This command has the following operations:
5959
Download the Nix expressions of subscribed channels and create a new generation.
6060
Update all channels if none is specified, and only those included in *names* otherwise.
6161

62+
> **Note**
63+
>
64+
> Downloaded channel contents are cached.
65+
> Use `--tarball-ttl` or the [`tarball-ttl` configuration option](@docroot@/command-ref/conf-file.md#conf-tarball-ttl) to change the validity period of cached downloads.
66+
6267
- `--list-generations`
6368

6469
Prints a list of all the current existing generations for the

doc/manual/source/glossary.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,22 @@
3131

3232
The industry term for storage and retrieval systems using [content addressing](#gloss-content-address). A Nix store also has [input addressing](#gloss-input-addressed-store-object), and metadata.
3333

34+
- [derivation]{#gloss-derivation}
35+
36+
A derivation can be thought of as a [pure function](https://en.wikipedia.org/wiki/Pure_function) that produces new [store objects][store object] from existing store objects.
37+
38+
Derivations are implemented as [operating system processes that run in a sandbox](@docroot@/store/building.md#builder-execution).
39+
This sandbox by default only allows reading from store objects specified as inputs, and only allows writing to designated [outputs][output] to be [captured as store objects](@docroot@/store/building.md#processing-outputs).
40+
41+
A derivation is typically specified as a [derivation expression] in the [Nix language], and [instantiated][instantiate] to a [store derivation].
42+
There are multiple ways of obtaining store objects from store derivatons, collectively called [realisation][realise].
43+
44+
[derivation]: #gloss-derivation
45+
3446
- [store derivation]{#gloss-store-derivation}
3547

36-
A single build task.
48+
A [derivation] represented as a [store object].
49+
3750
See [Store Derivation](@docroot@/store/derivation/index.md#store-derivation) for details.
3851

3952
[store derivation]: #gloss-store-derivation
@@ -57,10 +70,7 @@
5770

5871
- [derivation expression]{#gloss-derivation-expression}
5972

60-
A description of a [store derivation] in the Nix language.
61-
The output(s) of a derivation are store objects.
62-
Derivations are typically specified in Nix expressions using the [`derivation` primitive](./language/derivations.md).
63-
These are translated into store layer *derivations* (implicitly by `nix-env` and `nix-build`, or explicitly by `nix-instantiate`).
73+
A description of a [store derivation] using the [`derivation` primitive](./language/derivations.md) in the [Nix language].
6474

6575
[derivation expression]: #gloss-derivation-expression
6676

doc/manual/source/language/advanced-attributes.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,13 @@ Derivations can declare some infrequently used optional attributes.
5353
5454
- [`__structuredAttrs`]{#adv-attr-structuredAttrs}\
5555
If the special attribute `__structuredAttrs` is set to `true`, the other derivation
56-
attributes are serialised into a file in JSON format. The environment variable
57-
`NIX_ATTRS_JSON_FILE` points to the exact location of that file both in a build
58-
and a [`nix-shell`](../command-ref/nix-shell.md). This obviates the need for
59-
[`passAsFile`](#adv-attr-passAsFile) since JSON files have no size restrictions,
60-
unlike process environments.
61-
62-
It also makes it possible to tweak derivation settings in a structured way; see
63-
[`outputChecks`](#adv-attr-outputChecks) for example.
64-
65-
As a convenience to Bash builders,
66-
Nix writes a script that initialises shell variables
67-
corresponding to all attributes that are representable in Bash. The
68-
environment variable `NIX_ATTRS_SH_FILE` points to the exact
69-
location of the script, both in a build and a
70-
[`nix-shell`](../command-ref/nix-shell.md). This includes non-nested
71-
(associative) arrays. For example, the attribute `hardening.format = true`
72-
ends up as the Bash associative array element `${hardening[format]}`.
56+
attributes are serialised into a file in JSON format.
57+
58+
This obviates the need for [`passAsFile`](#adv-attr-passAsFile) since JSON files have no size restrictions, unlike process environments.
59+
It also makes it possible to tweak derivation settings in a structured way;
60+
see [`outputChecks`](#adv-attr-outputChecks) for example.
61+
62+
See the [corresponding section in the derivation page](@docroot@/store/derivation/index.md#structured-attrs) for further details.
7363
7464
> **Warning**
7565
>

doc/manual/source/language/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nix Language
22

3-
The Nix language is designed for conveniently creating and composing *derivations* – precise descriptions of how contents of existing files are used to derive new files.
3+
The Nix language is designed for conveniently creating and composing [derivations](@docroot@/glossary.md#gloss-derivation) – precise descriptions of how contents of existing files are used to derive new files.
44

55
> **Tip**
66
>

doc/manual/source/language/operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ All comparison operators are implemented in terms of `<`, and the following equi
196196

197197
## Logical implication
198198

199-
Equivalent to `!`*b1* `||` *b2*.
199+
Equivalent to `!`*b1* `||` *b2* (or `if` *b1* `then` *b2* `else true`)
200200

201201
[Logical implication]: #logical-implication
202202

0 commit comments

Comments
 (0)