Home Explore Blog CI



nix

1st chunk of `doc/manual/source/release-notes/rl-1.7.md`
254fb9a3e6d48e31d30fb8a7a071cab6caa79b876fd646290000000100000c3c
# Release 1.7 (2014-04-11)

In addition to the usual bug fixes, this release has the following new
features:

  - Antiquotation is now allowed inside of quoted attribute names (e.g.
    `set."${foo}"`). In the case where the attribute name is just a
    single antiquotation, the quotes can be dropped (e.g. the above
    example can be written `set.${foo}`). If an attribute name inside of
    a set declaration evaluates to `null` (e.g. `{ ${null} = false; }`),
    then that attribute is not added to the set.

  - Experimental support for cryptographically signed binary caches. See
    [the commit for
    details](https://github.com/NixOS/nix/commit/0fdf4da0e979f992db75cc17376e455ddc5a96d8).

  - An experimental new substituter, `download-via-ssh`, that fetches
    binaries from remote machines via SSH. Specifying the flags
    `--option
                    use-ssh-substituter true --option ssh-substituter-hosts
                    user@hostname` will cause Nix to download binaries from the
    specified machine, if it has them.

  - `nix-store -r` and `nix-build` have a new flag, `--check`, that
    builds a previously built derivation again, and prints an error
    message if the output is not exactly the same. This helps to verify
    whether a derivation is truly deterministic. For example:
    
        $ nix-build '<nixpkgs>' -A patchelf
        …
        $ nix-build '<nixpkgs>' -A patchelf --check
        …
        error: derivation `/nix/store/1ipvxs…-patchelf-0.6' may not be deterministic:
          hash mismatch in output `/nix/store/4pc1dm…-patchelf-0.6.drv'

  - The `nix-instantiate` flags `--eval-only` and `--parse-only` have
    been renamed to `--eval` and `--parse`, respectively.

  - `nix-instantiate`, `nix-build` and `nix-shell` now have a flag
    `--expr` (or `-E`) that allows you to specify the expression to be
    evaluated as a command line argument. For instance, `nix-instantiate
    --eval -E
                    '1 + 2'` will print `3`.

  - `nix-shell` improvements:
    
      - It has a new flag, `--packages` (or `-p`), that sets up a build
        environment containing the specified packages from Nixpkgs. For
        example, the command
        
            $ nix-shell -p sqlite xorg.libX11 hello
        
        will start a shell in which the given packages are present.
    
      - It now uses `shell.nix` as the default expression, falling back
        to `default.nix` if the former doesn’t exist. This makes it
        convenient to have a `shell.nix` in your project to set up a
        nice development environment.
    
      - It evaluates the derivation attribute `shellHook`, if set. Since
        `stdenv` does not normally execute this hook, it allows you to
        do `nix-shell`-specific setup.
    
      - It preserves the user’s timezone setting.

  - In chroots, Nix now sets up a `/dev` containing only a minimal set
    of devices (such as `/dev/null`). Note that it only does this if you
    *don’t* have `/dev` listed in your `build-chroot-dirs` setting;
    otherwise, it will bind-mount the `/dev` from outside the chroot.

Title: Nix Release 1.7 Features and Improvements
Summary
Release 1.7 of Nix includes several new features and improvements, such as allowing antiquotation in quoted attribute names, experimental support for cryptographically signed binary caches and a new substituter for fetching binaries via SSH. The release also introduces a `--check` flag for `nix-store -r` and `nix-build` to verify derivation determinism, renames `--eval-only` and `--parse-only` flags, adds an `--expr` flag for specifying expressions on the command line, and enhances `nix-shell` with features like `--packages`, `shell.nix` default expression, `shellHook` evaluation, and timezone preservation. It also sets up a minimal `/dev` in chroots.