Release 2.15 (2023-04-11)
-
Commands which take installables on the command line can now read them from the standard input if passed the
--stdinflag. This is primarily useful when you have a large amount of paths which exceed the OS argument limit. -
The
nix-hashcommand now supports Base64 and SRI. Use the flags--base64or--srito specify the format of output hash as Base64 or SRI, and--to-base64or--to-srito convert a hash to Base64 or SRI format, respectively.As the choice of hash formats is no longer binary, the
--base16flag is also added to explicitly specify the Base16 format, which is still the default. -
The special handling of an installable with
.drvsuffix being interpreted as all of the given store derivation's output paths is removed, and instead taken as the literal store path that it represents.The new
^syntax for store paths introduced in Nix 2.13 allows explicitly referencing output paths of a derivation. Using this is better and more clear than relying on the now-removed.drvspecial handling.For example,
$ nix path-info /nix/store/gzaflydcr6sb3567hap9q6srzx8ggdgg-glibc-2.33-78.drvnow gives info about the derivation itself, while
$ nix path-info /nix/store/gzaflydcr6sb3567hap9q6srzx8ggdgg-glibc-2.33-78.drv^*provides information about each of its outputs.
-
The experimental command
nix describe-storeshas been removed. -
Nix stores and their settings are now documented in
nix help-stores. -
Documentation for operations of
nix-storeandnix-envare now available on separate pages of the manual. They include all common options that can be specified and common environment variables that affect these commands.These pages can be viewed offline with
manusingman nix-store-<operation>andman nix-env-<operation>nix-store --help --<operation>andnix-env --help --<operation>.
-
Nix when used as a client now checks whether the store (the server) trusts the client. (The store always had to check whether it trusts the client, but now the client is informed of the store's decision.) This is useful for scripting interactions with (non-legacy-ssh) remote Nix stores.
nix store pingandnix doctornow display this information. -
The new command
nix derivation addallows adding derivations to the store without involving the Nix language. It exists to round out our collection of basic utility/plumbing commands, and allow for a low barrier-to-entry way of experimenting with alternative front-ends to the Nix Store. It uses the same JSON layout asnix derivation show, and is its inverse. -
nix show-derivationhas been renamed tonix derivation show. This matchesnix derivation add, and avoids bloating the top-level namespace. The old name is still kept as an alias for compatibility, however. -
The
nix derivation {add,show}JSON format now includes the derivation name as a top-level field. This is useful in general, but especially necessary for theadddirection, as otherwise we would need to pass in the name out of band for certain cases.