about summary refs log tree commit diff
path: root/third_party/nix/doc/manual/release-notes/rl-1.11.xml
blob: fe422dd1f89311ac90d0eb6a3ede9631ed5c9a81 (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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<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.11">

<title>Release 1.11 (2016-01-19)</title>

<para>This is primarily a bug fix release. It also has a number of new
features:</para>

<itemizedlist>

  <listitem>
    <para><command>nix-prefetch-url</command> can now download URLs
    specified in a Nix expression. For example,

<screen>
$ nix-prefetch-url -A hello.src
</screen>

    will prefetch the file specified by the
    <function>fetchurl</function> call in the attribute
    <literal>hello.src</literal> from the Nix expression in the
    current directory, and print the cryptographic hash of the
    resulting file on stdout. This differs from <literal>nix-build -A
    hello.src</literal> in that it doesn't verify the hash, and is
    thus useful when you’re updating a Nix expression.</para>

    <para>You can also prefetch the result of functions that unpack a
    tarball, such as <function>fetchFromGitHub</function>. For example:

<screen>
$ nix-prefetch-url --unpack https://github.com/NixOS/patchelf/archive/0.8.tar.gz
</screen>

    or from a Nix expression:

<screen>
$ nix-prefetch-url -A nix-repl.src
</screen>

    </para>

  </listitem>

  <listitem>
    <para>The builtin function
    <function>&lt;nix/fetchurl.nix></function> now supports
    downloading and unpacking NARs. This removes the need to have
    multiple downloads in the Nixpkgs stdenv bootstrap process (like a
    separate busybox binary for Linux, or curl/mkdir/sh/bzip2 for
    Darwin). Now all those files can be combined into a single NAR,
    optionally compressed using <command>xz</command>.</para>
  </listitem>

  <listitem>
    <para>Nix now supports SHA-512 hashes for verifying fixed-output
    derivations, and in <function>builtins.hashString</function>.</para>
  </listitem>

  <listitem>
    <para>
      The new flag <option>--option build-repeat
      <replaceable>N</replaceable></option> will cause every build to
      be executed <replaceable>N</replaceable>+1 times. If the build
      output differs between any round, the build is rejected, and the
      output paths are not registered as valid. This is primarily
      useful to verify build determinism. (We already had a
      <option>--check</option> option to repeat a previously succeeded
      build. However, with <option>--check</option>, non-deterministic
      builds are registered in the DB. Preventing that is useful for
      Hydra to ensure that non-deterministic builds don't end up
      getting published to the binary cache.)
    </para>
  </listitem>

  <listitem>
    <para>
      The options <option>--check</option> and <option>--option
      build-repeat <replaceable>N</replaceable></option>, if they
      detect a difference between two runs of the same derivation and
      <option>-K</option> is given, will make the output of the other
      run available under
      <filename><replaceable>store-path</replaceable>-check</filename>. This
      makes it easier to investigate the non-determinism using tools
      like <command>diffoscope</command>, e.g.,

<screen>
$ nix-build pkgs/stdenv/linux -A stage1.pkgs.zlib --check -K
error: derivation ‘/nix/store/l54i8wlw2265…-zlib-1.2.8.drv’ may not
be deterministic: output ‘/nix/store/11a27shh6n2i…-zlib-1.2.8’
differs from ‘/nix/store/11a27shh6n2i…-zlib-1.2.8-check’

$ diffoscope /nix/store/11a27shh6n2i…-zlib-1.2.8 /nix/store/11a27shh6n2i…-zlib-1.2.8-check
├── lib/libz.a
│   ├── metadata
│   │ @@ -1,15 +1,15 @@
│   │ -rw-r--r-- 30001/30000   3096 Jan 12 15:20 2016 adler32.o
│   │ +rw-r--r-- 30001/30000   3096 Jan 12 15:28 2016 adler32.o
</screen>

    </para></listitem>

  <listitem>
    <para>Improved FreeBSD support.</para>
  </listitem>

  <listitem>
    <para><command>nix-env -qa --xml --meta</command> now prints
    license information.</para>
  </listitem>

  <listitem>
    <para>The maximum number of parallel TCP connections that the
    binary cache substituter will use has been decreased from 150 to
    25. This should prevent upsetting some broken NAT routers, and
    also improves performance.</para>
  </listitem>

  <listitem>
    <para>All "chroot"-containing strings got renamed to "sandbox".
      In particular, some Nix options got renamed, but the old names
      are still accepted as lower-priority aliases.
    </para>
  </listitem>

</itemizedlist>

<para>This release has contributions from Anders Claesson, Anthony
Cowley, Bjørn Forsman, Brian McKenna, Danny Wilson, davidak, Eelco Dolstra,
Fabian Schmitthenner, FrankHB, Ilya Novoselov, janus, Jim Garrison, John
Ericson, Jude Taylor, Ludovic Courtès, Manuel Jacob, Mathnerd314,
Pascal Wittmann, Peter Simons, Philip Potter, Preston Bennes, Rommel
M. Martinez, Sander van der Burg, Shea Levy, Tim Cuthbertson, Tuomas
Tynkkynen, Utku Demir and Vladimír Čunát.</para>

</section>