Home Explore Blog CI



nixpkgs

4th chunk of `nixos/doc/manual/release-notes/rl-1509.section.md`
8bc67446addae5369a72d20b81d44ddf164c3cc9684624cb0000000100000fa1
- The `haskellPackages` set in Nixpkgs used to have a function attribute called `extension` that users could override in their `~/.nixpkgs/config.nix` files to configure additional attributes, etc. That function still exists, but it's now called `overrides`.

- The OpenBLAS library has been updated to version `0.2.14`. Support for the `x86_64-darwin` platform was added. Dynamic architecture detection was enabled; OpenBLAS now selects microarchitecture-optimized routines at runtime, so optimal performance is achieved without the need to rebuild OpenBLAS locally. OpenBLAS has replaced ATLAS in most packages which use an optimized BLAS or LAPACK implementation.

- The `phpfpm` is now using the default PHP version (`pkgs.php`) instead of PHP 5.4 (`pkgs.php54`).

- The `locate` service no longer indexes the Nix store by default, preventing packages with potentially numerous versions from cluttering the output. Indexing the store can be activated by setting `services.locate.includeStore = true`.

- The Nix expression search path (`NIX_PATH`) no longer contains `/etc/nixos/nixpkgs` by default. You can override `NIX_PATH` by setting `nix.nixPath`.

- Python 2.6 has been marked as broken (as it no longer receives security updates from upstream).

- Any use of module arguments such as `pkgs` to access library functions, or to define `imports` attributes will now lead to an infinite loop at the time of the evaluation.

  In case of an infinite loop, use the `--show-trace` command line argument and read the line just above the error message.

  ```ShellSession
  $ nixos-rebuild build --show-trace
  …
  while evaluating the module argument `pkgs' in "/etc/nixos/my-module.nix":
  infinite recursion encountered
  ```

  Any use of `pkgs.lib`, should be replaced by `lib`, after adding it as argument of the module. The following module

  ```nix
  { config, pkgs, ... }:

  with pkgs.lib;

  {
    options = {
      foo = mkOption { /* … */ };
    };
    config = mkIf config.foo { /* … */ };
  }
  ```

  should be modified to look like:

  ```nix
  { config, pkgs, lib, ... }:

  with lib;

  {
    options = {
      foo = mkOption { /* option declaration */ };
    };
    config = mkIf config.foo { /* option definition */ };
  }
  ```

  When `pkgs` is used to download other projects to import their modules, and only in such cases, it should be replaced by `(import <nixpkgs> {})`. The following module

  ```nix
  { config, pkgs, ... }:

  let
    myProject = pkgs.fetchurl {
      src = url;
      sha256 = hash;
    };
  in

  {
    imports = [ "${myProject}/module.nix" ];
  }
  ```

  should be modified to look like:

  ```nix
  { config, pkgs, ... }:

  let
    myProject = (import <nixpkgs> {}).fetchurl {
      src = url;
      sha256 = hash;
    };
  in

  {
    imports = [ "${myProject}/module.nix" ];
  }
  ```

Other notable improvements:

- The nixos and nixpkgs channels were unified, so one _can_ use `nix-env -iA nixos.bash` instead of `nix-env -iA nixos.pkgs.bash`. See [the commit](https://github.com/NixOS/nixpkgs/commit/2cd7c1f198) for details.

- Users running an SSH server who worry about the quality of their `/etc/ssh/moduli` file with respect to the [vulnerabilities discovered in the Diffie-Hellman key exchange](https://stribika.github.io/2015/01/04/secure-secure-shell.html) can now replace OpenSSH's default version with one they generated themselves using the new `services.openssh.moduliFile` option.

- A newly packaged TeX Live 2015 is provided in `pkgs.texlive`, split into 6500 nix packages. For basic user documentation see [the source](https://github.com/NixOS/nixpkgs/blob/release-15.09/pkgs/tools/typesetting/tex/texlive/default.nix#L1). Beware of [an issue](https://github.com/NixOS/nixpkgs/issues/9757) when installing a too large package set. The plan is to deprecate and maybe delete the original TeX packages until the next release.

- `buildEnv.env` on all Python interpreters is now available for nix-shell interoperability.

Title: More Incompatible Changes in Release 15.09 (cont.): Haskell, OpenBLAS, PHP, Locate, Nix Path, Python, Module Arguments, and Other Improvements
Summary
This section details further incompatible changes and improvements in NixOS Release 15.09. It includes renaming `haskellPackages.extension` to `haskellPackages.overrides`, updating OpenBLAS, using the default PHP version for phpfpm, preventing the `locate` service from indexing the Nix store by default, removing `/etc/nixos/nixpkgs` from `NIX_PATH`, marking Python 2.6 as broken, and addressing infinite loops caused by module arguments. Additionally, it highlights the unification of nixos and nixpkgs channels, a new option for OpenSSH moduli file, a newly packaged TeX Live 2015, and the availability of `buildEnv.env` on all Python interpreters.