Home Explore Blog Models CI



nix

doc/manual/source/release-notes/rl-2.10.md
ed29eb89cc381c81d6d5d801744f0409b5ea51ce32e0712e000000030000050b
# Release 2.10 (2022-07-11)

* `nix repl` now takes installables on the command line, unifying the usage
  with other commands that use `--file` and `--expr`. Primary breaking change
  is for the common usage of `nix repl '<nixpkgs>'` which can be recovered with
  `nix repl --file '<nixpkgs>'` or `nix repl --expr 'import <nixpkgs>{}'`.

  This is currently guarded by the `repl-flake` experimental feature.

* A new function `builtins.traceVerbose` is available. It is similar
  to `builtins.trace` if the `trace-verbose` setting is set to true,
  and it is a no-op otherwise.

* `nix search` has a new flag `--exclude` to filter out packages.

* On Linux, if `/nix` doesn't exist and cannot be created and you're
  not running as root, Nix will automatically use
  `~/.local/share/nix/root` as a chroot store. This enables non-root
  users to download the statically linked Nix binary and have it work
  out of the box, e.g.

  ```
  # ~/nix run nixpkgs#hello
  warning: '/nix' does not exists, so Nix will use '/home/ubuntu/.local/share/nix/root' as a chroot store
  Hello, world!
  ```

* `flake-registry.json` is now fetched from `channels.nixos.org`.

* Nix can now be built with LTO by passing `--enable-lto` to `configure`.
  LTO is currently only supported when building with GCC.

Chunks
2cce3183 (1st chunk of `doc/manual/source/release-notes/rl-2.10.md`)
Title: Nix Release 2.10 (2022-07-11)
Summary
Nix release 2.10 introduces several updates including changes to `nix repl` to accept installables (behind the `repl-flake` experimental feature), a new `builtins.traceVerbose` function, and an `--exclude` flag for `nix search`. It also enhances usability for non-root Linux users by automatically using a chroot store at `~/.local/share/nix/root` if `/nix` is unavailable. Additionally, `flake-registry.json` is now fetched from `channels.nixos.org`, and Nix can be built with Link Time Optimization (LTO) using GCC via `--enable-lto`.