Home Explore Blog Models CI



nix

doc/manual/source/release-notes/rl-2.3.md
a135752117dfc067b995df4850545218f1b14b9ed326640e0000000300000703
# Release 2.3 (2019-09-04)

This is primarily a bug fix release. However, it makes some incompatible
changes:

  - Nix now uses BSD file locks instead of POSIX file locks. Because of
    this, you should not use Nix 2.3 and previous releases at the same
    time on a Nix store.

It also has the following changes:

  - `builtins.fetchGit`'s `ref` argument now allows specifying an
    absolute remote ref. Nix will automatically prefix `ref` with
    `refs/heads` only if `ref` doesn't already begin with `refs/`.

  - The installer now enables sandboxing by default on Linux when the
    system has the necessary kernel support.

  - The `max-jobs` setting now defaults to 1.

  - New builtin functions: `builtins.isPath`, `builtins.hashFile`.

  - The `nix` command has a new `--print-build-logs` (`-L`) flag to
    print build log output to stderr, rather than showing the last log
    line in the progress bar. To distinguish between concurrent builds,
    log lines are prefixed by the name of the package.

  - Builds are now executed in a pseudo-terminal, and the `TERM`
    environment variable is set to `xterm-256color`. This allows many
    programs (e.g. `gcc`, `clang`, `cmake`) to print colorized log
    output.

  - Add `--no-net` convenience flag. This flag disables substituters;
    sets the `tarball-ttl` setting to infinity (ensuring that any
    previously downloaded files are considered current); and disables
    retrying downloads and sets the connection timeout to the minimum.
    This flag is enabled automatically if there are no configured
    non-loopback network interfaces.

  - Add a `post-build-hook` setting to run a program after a build has
    succeeded.

  - Add a `trace-function-calls` setting to log the duration of Nix
    function calls to stderr.

Chunks
839455cf (1st chunk of `doc/manual/source/release-notes/rl-2.3.md`)
Title: Nix Release 2.3 (2019-09-04)
Summary
This is a bug fix release for Nix 2.3, which includes an incompatible change: the switch from POSIX to BSD file locks, meaning Nix 2.3 and previous versions should not be used concurrently on the same Nix store. Key changes also include: `builtins.fetchGit`'s `ref` argument now supporting absolute remote refs, sandboxing enabled by default on Linux where supported, `max-jobs` defaulting to 1, new builtin functions `builtins.isPath` and `builtins.hashFile`, a `--print-build-logs` flag for `nix` commands, builds executed in pseudo-terminals for colorized output, a `--no-net` convenience flag to disable network activity, and new `post-build-hook` and `trace-function-calls` settings.