Home Explore Blog CI



nix

2nd chunk of `doc/manual/source/release-notes/rl-0.11.md`
d8c4b125ebf2e7f19fa1ca72660643c884c21e4defc15bb10000000100000a60
    is explicitly selected (e.g., `nix-env -i
            gcc-4.2.0rc1`).

  - `nix-env --set-flag` allows meta attributes of installed packages to
    be modified. There are several attributes that can be usefully
    modified, because they affect the behaviour of `nix-env` or the user
    environment build script:
    
      - `meta.priority` can be changed to resolve filename clashes (see
        above).
    
      - `meta.keep` can be set to `true` to prevent the package from
        being upgraded or replaced. Useful if you want to hang on to an
        older version of a package.
    
      - `meta.active` can be set to `false` to “disable” the package.
        That is, no symlinks will be generated to the files of the
        package, but it remains part of the profile (so it won’t be
        garbage-collected). Set it back to `true` to re-enable the
        package.

  - `nix-env -q` now has a flag `--prebuilt-only` (`-b`) that causes
    `nix-env` to show only those derivations whose output is already in
    the Nix store or that can be substituted (i.e., downloaded from
    somewhere). In other words, it shows the packages that can be
    installed “quickly”, i.e., don’t need to be built from source. The
    `-b` flag is also available in `nix-env -i` and `nix-env -u` to
    filter out derivations for which no pre-built binary is available.

  - The new option `--argstr` (in `nix-env`, `nix-instantiate` and
    `nix-build`) is like `--arg`, except that the value is a string. For
    example, `--argstr system
            i686-linux` is equivalent to `--arg system
            \"i686-linux\"` (note that `--argstr` prevents annoying quoting
    around shell arguments).

  - `nix-store` has a new operation `--read-log` (`-l`) `paths` that
    shows the build log of the given paths.

  - Nix now uses Berkeley DB 4.5. The database is upgraded
    automatically, but you should be careful not to use old versions of
    Nix that still use Berkeley DB 4.4.

  - The option `--max-silent-time` (corresponding to the configuration
    setting `build-max-silent-time`) allows you to set a timeout on
    builds — if a build produces no output on `stdout` or `stderr` for
    the given number of seconds, it is terminated. This is useful for
    recovering automatically from builds that are stuck in an infinite
    loop.

  - `nix-channel`: each subscribed channel is its own attribute in the
    top-level expression generated for the channel. This allows
    disambiguation (e.g. `nix-env
            -i -A nixpkgs_unstable.firefox`).

  - The substitutes table has been removed from the database. This makes

Title: Nix 0.11 Release - Continued Improvements: Flags, Options and Database Updates
Summary
This section details more enhancements in Nix 0.11, including the use of `nix-env --set-flag` to modify package meta attributes like priority, keep, and active status. It introduces the `--prebuilt-only` flag in `nix-env -q`, `-i`, and `-u` to filter derivations based on the availability of pre-built binaries. The `--argstr` option simplifies passing string arguments. The `nix-store` command gains a `--read-log` operation. The release also updates to Berkeley DB 4.5, introduces a `--max-silent-time` option for build timeouts, and modifies `nix-channel` to improve disambiguation. Finally, the substitutes table has been removed from the database.