Home Explore Blog CI



nix

1st chunk of `doc/manual/source/release-notes/rl-2.19.md`
0839e673b7f5d5fa5ea5ba4765003e254e4bc50b063b72eb0000000100000a03
# Release 2.19 (2023-11-17)

- The experimental `nix` command can now act as a [shebang interpreter](@docroot@/command-ref/new-cli/nix.md#shebang-interpreter)
  by appending the contents of any `#! nix` lines and the script's location into a single call.

- [URL flake references](@docroot@/command-ref/new-cli/nix3-flake.md#flake-references) now support [percent-encoded](https://datatracker.ietf.org/doc/html/rfc3986#section-2.1) characters.

- [Path-like flake references](@docroot@/command-ref/new-cli/nix3-flake.md#path-like-syntax) now accept arbitrary unicode characters (except `#` and `?`).

- The experimental feature `repl-flake` is no longer needed, as its functionality is now part of the `flakes` experimental feature. To get the previous behavior, use the `--file/--expr` flags accordingly.

- There is a new flake installable syntax `flakeref#.attrPath` where the "." prefix specifies that `attrPath` is interpreted from the root of the flake outputs, with no searching of default attribute prefixes like `packages.<SYSTEM>` or `legacyPackages.<SYSTEM>`.

- Nix adds `apple-virt` to the default system features on macOS systems that support virtualization. This is similar to what's done for the `kvm` system feature on Linux hosts.

- Add a new built-in function [`builtins.convertHash`](@docroot@/language/builtins.md#builtins-convertHash).

- `nix-shell` shebang lines now support single-quoted arguments.

- `builtins.fetchTree` is now its own experimental feature, [`fetch-tree`](@docroot@/development/experimental-features.md#xp-fetch-tree).
  This allows stabilising it independently of the rest of what is encompassed by [`flakes`](@docroot@/development/experimental-features.md#xp-fetch-tree).

- The interface for creating and updating lock files has been overhauled:

  - [`nix flake lock`](@docroot@/command-ref/new-cli/nix3-flake-lock.md) only creates lock files and adds missing inputs now.
    It will *never* update existing inputs.

  - [`nix flake update`](@docroot@/command-ref/new-cli/nix3-flake-update.md) does the same, but *will* update inputs.
    - Passing no arguments will update all inputs of the current flake, just like it already did.
    - Passing input names as arguments will ensure only those are updated. This replaces the functionality of `nix flake lock --update-input`
    - To operate on a flake outside the current directory, you must now pass `--flake path/to/flake`.

  - The flake-specific flags `--recreate-lock-file` and `--update-input` have been removed from all commands operating on installables.

Title: Nix Release 2.19 (2023-11-17) - Feature Updates and Changes
Summary
Release 2.19 of Nix introduces several improvements and changes, including shebang interpreter functionality for the `nix` command, enhanced support for URL and path-like flake references, the removal of the `repl-flake` experimental feature, a new flake installable syntax, the addition of `apple-virt` to default system features on macOS, a new built-in function `builtins.convertHash`, improvements to `nix-shell` shebang lines, the separation of `builtins.fetchTree` into its own experimental feature, and a significant overhaul of the lock file creation and update process using `nix flake lock` and `nix flake update` commands.