Home Explore Blog Models CI



nix

3rd chunk of `doc/manual/source/release-notes/rl-1.9.md`
92f540d1214392bd4285e2fc3207cdee42bcf73eb9de04890000000100000bf3
              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: Continued Chroot, Evaluation, and Usability Enhancements
Summary
This chunk details additional improvements in Nix Release 1.9. Chroot functionality sees further enhancements, including Mac OS X support, application to all derivations by default (with a `relaxed` option for older behavior), restored private PID namespaces on Linux, and automatic expansion of `build-chroot-dirs` paths. New features include the `passAsFile` derivation attribute for handling long strings, support for `~` in Nix file paths, and a `restrict-eval` option to limit file access during evaluation for reproducibility. Usability improvements cover `nix-env` only creating new generations on actual changes, a `NIX_PAGER` environment variable, better error reporting for `<...>` lookups, and optimized Boehm GC use. The chunk concludes with a list of contributors to this release.