Home Explore Blog CI



nix

3rd chunk of `doc/manual/source/release-notes/rl-1.9.md`
aca5ecd3bc89e6ec0a22bf14b5ebbcf11f6f1c71d06bc3740000000100000bf3
              print (take 100 body)
        
        Of course, the dependencies are cached in the Nix store, so the
        second invocation of this script will be much faster.

  - Chroot improvements:
    
      - Chroot builds are now supported on Mac OS X (using its sandbox
        mechanism).
    
      - If chroots are enabled, they are now used for all derivations,
        including fixed-output derivations (such as `fetchurl`). The
        latter do have network access, but can no longer access the host
        filesystem. If you need the old behaviour, you can set the
        option `build-use-chroot` to `relaxed`.
    
      - On Linux, if chroots are enabled, builds are performed in a
        private PID namespace once again. (This functionality was lost
        in Nix 1.8.)
    
      - Store paths listed in `build-chroot-dirs` are now automatically
        expanded to their closure. For instance, if you want
        `/nix/store/…-bash/bin/sh` mounted in your chroot as `/bin/sh`,
        you only need to say `build-chroot-dirs =
                                                        /bin/sh=/nix/store/…-bash/bin/sh`; it is no longer necessary to
        specify the dependencies of Bash.

  - The new derivation attribute `passAsFile` allows you to specify that
    the contents of derivation attributes should be passed via files
    rather than environment variables. This is useful if you need to
    pass very long strings that exceed the size limit of the
    environment. The Nixpkgs function `writeTextFile` uses this.

  - You can now use `~` in Nix file names to refer to your home
    directory, e.g. `import
            ~/.nixpkgs/config.nix`.

  - Nix has a new option `restrict-eval` that allows limiting what paths
    the Nix evaluator has access to. By passing `--option restrict-eval
    true` to Nix, the evaluator will throw an exception if an attempt is
    made to access any file outside of the Nix search path. This is
    primarily intended for Hydra to ensure that a Hydra jobset only
    refers to its declared inputs (and is therefore reproducible).

  - `nix-env` now only creates a new “generation” symlink in
    `/nix/var/nix/profiles` if something actually changed.

  - The environment variable `NIX_PAGER` can now be set to override
    `PAGER`. You can set it to `cat` to disable paging for Nix commands
    only.

  - Failing `<...>` lookups now show position information.

  - Improved Boehm GC use: we disabled scanning for interior pointers,
    which should reduce the “`Repeated
            allocation of very large block`” warnings and associated retention
    of memory.

This release has contributions from aszlig, Benjamin Staffin, Charles
Strahan, Christian Theune, Daniel Hahler, Danylo Hlynskyi Daniel
Peebles, Dan Peebles, Domen Kožar, Eelco Dolstra, Harald van Dijk, Hoang
Xuan Phu, Jaka Hudoklin, Jeff Ramnani, j-keck, Linquize, Luca Bruno,
Michael Merickel, Oliver Dunkl, Rob Vermaas, Rok Garbas, Shea Levy,
Tobias Geerinckx-Rice and William A. Kennington III.

Title: Nix Release 1.9 - Derivation Attributes, Restricted Evaluation, and Other Improvements
Summary
Nix release 1.9 introduces the `passAsFile` derivation attribute to pass large strings as files, allows `~` in Nix file names to refer to the home directory, and offers a `restrict-eval` option to limit evaluator access to specific paths. `nix-env` only creates new generation symlinks on changes, `NIX_PAGER` can override `PAGER`, and failing lookups now show position information. Improved Boehm GC use reduces memory retention.