2021-12-13 17:48:44 +02:00
|
|
|
# Release X.Y (202?-??-??)
|
2021-12-21 15:19:21 +02:00
|
|
|
|
2022-09-16 11:59:24 +03:00
|
|
|
* `<nix/fetchurl.nix>` now accepts an additional argument `impure` which
|
|
|
|
defaults to `false`. If it is set to `true`, the `hash` and `sha256`
|
|
|
|
arguments will be ignored and the resulting derivation will have
|
|
|
|
`__impure` set to `true`, making it an impure derivation.
|
|
|
|
|
2022-11-14 16:03:53 +02:00
|
|
|
* If `builtins.readFile` is called on a file with context, then only the parts
|
|
|
|
of that context that appear in the content of the file are retained.
|
|
|
|
This avoids a lot of spurious errors where some benign strings end-up having
|
|
|
|
a context just because they are read from a store path
|
|
|
|
([#7260](https://github.com/NixOS/nix/pull/7260)).
|
2022-11-23 16:24:50 +02:00
|
|
|
|
|
|
|
* Nix can now automatically pick UIDs for builds, removing the need to
|
2022-12-01 05:40:02 +02:00
|
|
|
create `nixbld*` user accounts.
|
2022-11-23 16:24:50 +02:00
|
|
|
|
2022-12-01 05:40:02 +02:00
|
|
|
See [`auto-allocate-uids`].
|
2022-11-23 16:24:50 +02:00
|
|
|
|
2022-12-01 05:40:02 +02:00
|
|
|
[`auto-allocate-uids`]: (../command-ref/conf-file.md#conf-auto-allocate-uids)
|
2022-11-23 16:24:50 +02:00
|
|
|
|
|
|
|
* On Linux, Nix can now run builds in a user namespace where the build
|
2022-12-01 05:40:02 +02:00
|
|
|
runs as root (UID 0) and has 65,536 UIDs available.
|
|
|
|
|
|
|
|
<!-- FIXME: move this to its own section about system features -->
|
|
|
|
|
|
|
|
This is primarily useful for running containers such as `systemd-nspawn`
|
|
|
|
inside a Nix build. For an example, see [`tests/systemd-nspawn/nix`][nspawn].
|
|
|
|
|
|
|
|
[nspawn]: https://github.com/NixOS/nix/blob/67bcb99700a0da1395fa063d7c6586740b304598/tests/systemd-nspawn.nix.
|
2022-11-23 16:24:50 +02:00
|
|
|
|
2022-12-01 05:40:02 +02:00
|
|
|
A build can enable this by by setting the derivation attribute:
|
2022-11-23 16:24:50 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
requiredSystemFeatures = [ "uid-range" ];
|
|
|
|
```
|
|
|
|
|
2022-12-01 05:40:02 +02:00
|
|
|
The `uid-range` [system feature] requires the [`auto-allocate-uids`]
|
|
|
|
setting to be enabled.
|
2022-11-23 16:24:50 +02:00
|
|
|
|
2022-12-01 05:40:02 +02:00
|
|
|
[system feature]: (../command-ref/conf-file.md#conf-system-features),
|
2022-11-23 16:24:50 +02:00
|
|
|
|
2022-12-01 05:40:02 +02:00
|
|
|
* On Linux, Nix has experimental support for running builds inside a
|
|
|
|
cgroup.
|
2022-11-23 16:24:50 +02:00
|
|
|
|
2022-12-01 05:40:02 +02:00
|
|
|
See [`use-cgroups`](../command-ref/conf-file.md#conf-use-cgroups).
|
2022-11-23 16:24:50 +02:00
|
|
|
|
|
|
|
* `nix build --json` now prints some statistics about top-level
|
|
|
|
derivations, such as CPU statistics when cgroups are enabled.
|