about summary refs log tree commit diff
path: root/doc/manual/release-notes/rl-1.6.xml
blob: a3d61faf2b73641f8ad98149769a2718b38b8550 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<section xmlns="http://docbook.org/ns/docbook"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      version="5.0"
      xml:id="ssec-relnotes-1.6.0">

<title>Release 1.6 (September 10, 2013)</title>

<para>In addition to the usual bug fixes, this release has several new
features:</para>

<itemizedlist>

  <listitem>
    <para>The command <command>nix-build --run-env</command> has been
    renamed to <command>nix-shell</command>.</para>
  </listitem>

  <listitem>
    <para><command>nix-shell</command> now sources
    <filename>$stdenv/setup</filename> <emphasis>inside</emphasis> the
    interactive shell, rather than in a parent shell.  This ensures
    that shell functions defined by <literal>stdenv</literal> can be
    used in the interactive shell.</para>
  </listitem>

  <listitem>
    <para><command>nix-shell</command> has a new flag
    <option>--pure</option> to clear the environment, so you get an
    environment that more closely corresponds to the “real” Nix build.
    </para>
  </listitem>

  <listitem>
    <para><command>nix-shell</command> now sets the shell prompt
    (<envar>PS1</envar>) to ensure that Nix shells are distinguishable
    from your regular shells.</para>
  </listitem>

  <listitem>
    <para><command>nix-env</command> no longer requires a
    <literal>*</literal> argument to match all packages, so
    <literal>nix-env -qa</literal> is equivalent to <literal>nix-env
    -qa '*'</literal>.</para>
  </listitem>

  <listitem>
    <para><command>nix-env -i</command> has a new flag
    <option>--remove-all</option> (<option>-r</option>) to remove all
    previous packages from the profile.  This makes it easier to do
    declarative package management similar to NixOS’s
    <option>environment.systemPackages</option>.  For instance, if you
    have a specification <filename>my-packages.nix</filename> like this:

<programlisting>
with import &lt;nixpkgs> {};
[ thunderbird
  geeqie
  ...
]
</programlisting>

    then after any change to this file, you can run:

<screen>
$ nix-env -f my-packages.nix -ir
</screen>

    to update your profile to match the specification.</para>
  </listitem>

  <listitem>
    <para>The ‘<literal>with</literal>’ language construct is now more
    lazy.  It only evaluates its argument if a variable might actually
    refer to an attribute in the argument.  For instance, this now
    works:

<programlisting>
let
  pkgs = with pkgs; { foo = "old"; bar = foo; } // overrides;
  overrides = { foo = "new"; };
in pkgs.bar
</programlisting>

    This evaluates to <literal>"new"</literal>, while previously it
    gave an “infinite recursion” error.</para>
  </listitem>

  <listitem>
    <para>Nix now has proper integer arithmetic operators. For
    instance, you can write <literal>x + y</literal> instead of
    <literal>builtins.add x y</literal>, or <literal>x &lt;
    y</literal> instead of <literal>builtins.lessThan x y</literal>.
    The comparison operators also work on strings.</para>
  </listitem>

  <listitem>
    <para>On 64-bit systems, Nix integers are now 64 bits rather than
    32 bits.</para>
  </listitem>

  <listitem>
    <para>When using the Nix daemon, the <command>nix-daemon</command>
    worker process now runs on the same CPU as the client, on systems
    that support setting CPU affinity.  This gives a significant speedup
    on some systems.</para>
  </listitem>

  <listitem>
    <para>If a stack overflow occurs in the Nix evaluator, you now get
    a proper error message (rather than “Segmentation fault”) on some
    systems.</para>
  </listitem>

  <listitem>
    <para>In addition to directories, you can now bind-mount regular
    files in chroots through the (now misnamed) option
    <option>build-chroot-dirs</option>.</para>
  </listitem>

</itemizedlist>

<para>This release has contributions from Domen Kožar, Eelco Dolstra,
Florian Friesdorf, Gergely Risko, Ivan Kozik, Ludovic Courtès and Shea
Levy.</para>

</section>