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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
|
<article xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-relnotes">
<title>Nix Release Notes</title>
<!--==================================================================-->
<section xml:id="ssec-relnotes-0.11"><title>Release 0.11 (December 31,
2007)</title>
<para>The most important improvement in Nix 0.11 is secure multi-user
support. It also features many usability improvements and language
extensions, many of them to support NixOS. Here is an (incomplete)
list:</para>
<itemizedlist>
<listitem><para>Secure multi-user support. A single Nix store can
now be shared between multiple (possible untrusted) users. This is
an important feature for NixOS, where it allows non-root users to
install software. The old setuid method for sharing a store between
multiple users has been removed. Details for setting up a
multi-user store can be found in the manual.</para></listitem>
<listitem><para>The new command <command>nix-copy-closure</command>
gives you an easy and efficient way to exchange software between
machines. It copies the missing parts of the closure of a set of
store path to or from a remote machine via
<command>ssh</command>.</para></listitem>
<listitem><para><command>nix-prefetch-url</command> now by default
computes the SHA-256 hash of the file instead of the MD5 hash. In
calls to <function>fetchurl</function> you should pass the
<literal>sha256</literal> attribute instead of
<literal>md5</literal>. You can pass either a hexadecimal or a
base-32 encoding of the hash.</para></listitem>
<listitem><para><command>nix-store</command> has a new operation
<option>--read-log</option> (<option>-l</option>)
<parameter>paths</parameter> that shows the build log of the given
paths.</para></listitem>
<listitem><para>Derivations can specify the new special attribute
<varname>allowedReferences</varname> to enforce that the references
in the output of a derivation are a subset of a declared set of
paths. For example, if <varname>allowedReferences</varname> is an
empty list, then the output must not have any references. This is
used in NixOS to check that generated files such as initial ramdisks
for booting Linux don’t have any dependencies.</para></listitem>
<!--
<listitem><para>TODO: semantic cleanups of string concatenation
etc. (mostly in r6740).</para></listitem>
-->
<listitem><para>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.</para></listitem>
<!-- foo
<listitem><para>TODO: option <option>- -reregister</option> in
<command>nix-store - -register-validity</command>.</para></listitem>
-->
<listitem><para>The new attribute
<varname>exportReferencesGraph</varname> allows builders access to
the references graph of their inputs. This is used in NixOS for
tasks such as generating ISO-9660 images that contain a Nix store
populated with the closure of certain paths.</para></listitem>
<listitem><para>The option <option>--max-silent-time</option>
(corresponding to the configuration setting
<literal>build-max-silent-time</literal>) allows you to set a
timeout on builds — if a build produces no output on
<literal>stdout</literal> or <literal>stderr</literal> for the given
number of seconds, it is terminated. This is useful for recovering
automatically from builds that are stuck in an infinite
loop.</para></listitem>
<listitem><para><command>nix-env</command> <option>--set</option>
modifies the current generation of a profile so that it contains
exactly the specified derivation, and nothing else. For example,
<literal>nix-env -p /nix/var/nix/profiles/browser --set
firefox</literal> lets the profile named
<filename>browser</filename> contain just Firefox.</para></listitem>
<listitem><para>The new option <option>--argstr</option> (in
<command>nix-env</command>, <command>nix-instantiate</command> and
<command>nix-build</command>) is like <option>--arg</option>, except
that the value is a string. For example, <literal>--argstr system
i686-linux</literal> is equivalent to <literal>--arg system
\"i686-linux\"</literal> (note that <option>--argstr</option>
prevents annoying quoting around shell arguments).</para></listitem>
<listitem><para><command>nix-env</command> now maintains
meta-information about installed packages in profiles. The
meta-information is the contents of the <varname>meta</varname>
attribute of derivations, such as <varname>description</varname> or
<varname>homepage</varname>. The command <literal>nix-env -q --xml
--meta</literal> shows all meta-information.</para></listitem>
<listitem><para><command>nix-env</command> now uses the
<varname>meta.priority</varname> attribute of derivations to resolve
filename collisions between packages. Lower priority values denote
a higher priority. For instance, the GCC wrapper package and the
Binutils package in Nixpkgs both have a file
<filename>bin/ld</filename>, so previously if you tried to install
both you would get a collision. Now, on the other hand, the GCC
wrapper declares a higher priority than Binutils, so the former’s
<filename>bin/ld</filename> is symlinked in the user
environment.</para></listitem>
<listitem><para><command>nix-env -i / -u</command>: instead of
breaking package ties by version, break them by priority and version
number. That is, if there are multiple packages with the same name,
then pick the package with the highest priority, and only use the
version if there are multiple packages with the same
priority.</para>
<para>This makes it possible to mark specific versions/variant in
Nixpkgs more or less desirable than others. A typical example would
be a beta version of some package (e.g.,
<literal>gcc-4.2.0rc1</literal>) which should not be installed even
though it is the highest version, except when it is explicitly
selected (e.g., <literal>nix-env -i
gcc-4.2.0rc1</literal>).</para></listitem>
<listitem><para><command>nix-env --set-flag</command> allows meta
attributes of installed packages to be modified. There are several
attributes that can be usefully modified, because they affect the
behaviour of <command>nix-env</command> or the user environment
build script:
<itemizedlist>
<listitem><para><varname>meta.priority</varname> can be changed
to resolve filename clashes (see above).</para></listitem>
<listitem><para><varname>meta.keep</varname> can be set to
<literal>true</literal> to prevent the package from being
upgraded or replaced. Useful if you want to hang on to an older
version of a package.</para></listitem>
<listitem><para><varname>meta.active</varname> can be set to
<literal>false</literal> 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 <literal>true</literal> to re-enable the
package.</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para><command>nix-env -q</command> now has a flag
<option>--prebuilt-only</option> (<option>-b</option>) that causes
<command>nix-env</command> 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 <option>-b</option> flag is also available in
<command>nix-env -i</command> and <command>nix-env -u</command> to
filter out derivations for which no pre-built binary is
available.</para></listitem>
<listitem><para>Several new built-in functions:
<function>builtins.attrNames</function>,
<function>builtins.filterSource</function>,
<function>builtins.isAttrs</function>,
<function>builtins.isFunction</function>,
<function>builtins.listToAttrs</function>,
<function>builtins.stringLength</function>,
<function>builtins.sub</function>,
<function>builtins.substring</function>,
<function>throw</function>,
<function>builtins.trace</function>,
<function>builtins.readFile</function>.</para></listitem>
<listitem><para><command>nix-channel</command>: each subscribed
channel is its own attribute in the top-level expression generated
for the channel. This allows disambiguation (e.g. <literal>nix-env
-i -A nixpkgs_unstable.firefox</literal>).</para></listitem>
<listitem><para>The substitutes table has been removed from the
database. This makes operations such as <command>nix-pull</command>
and <command>nix-channel --update</command> much, much
faster.</para></listitem>
<listitem><para><command>nix-prefetch-url</command> now has a
limited form of caching. This is used by
<command>nix-channel</command> to prevent unnecessary downloads when
the channel hasn’t changed.</para></listitem>
<listitem><para>Nix can now perform builds in an automatically
generated “chroot”. This prevents a builder from accessing stuff
outside of the Nix store, and thus helps ensure purity. This is an
experimental feature.</para></listitem>
<listitem><para>A new kind of string literal: strings between double
single-quotes (<literal>''</literal>) have indentation
“intelligently” removed. This allows large strings (such as shell
scripts or configuration file fragments in NixOS) to cleanly follow
the indentation of the surrounding expression. It also requires
much less escaping, since <literal>''</literal> is less common in
most languages than <literal>"</literal>.</para></listitem>
<listitem><para>The new command <command>nix-store
--optimise</command> reduces Nix store disk space usage by finding
identical files in the store and hard-linking them to each other.
It typically reduces the size of the store by something like
25-35%.</para></listitem>
<listitem><para>Allow <filename>~/.nix-defexpr</filename> to be a
directory, in which case the Nix expressions in that directory are
combined into an attribute set, with the file names used as the
names of the attributes. The command <command>nix-env
--import</command> (which set the
<filename>~/.nix-defexpr</filename> symlink) is
removed.</para></listitem>
<listitem><para>Fixed-output derivations (like
<function>fetchurl</function>) can define the attribute
<varname>impureEnvVars</varname> to allow external environment
variables to be passed to builders. This is used in Nixpkgs to
support proxy configuration, among other things.</para></listitem>
<listitem><para><command>nix-pull</command> now supports
bzip2-compressed manifests. This speeds up
channels.</para></listitem>
</itemizedlist>
</section>
<!--==================================================================-->
<section><title>Release 0.10.1 (October 11, 2006)</title>
<para>This release fixes two somewhat obscure bugs that occur when
evaluating Nix expressions that are stored inside the Nix store
(<literal>NIX-67</literal>). These do not affect most users.</para>
</section>
<!--==================================================================-->
<section><title>Release 0.10 (October 6, 2006)</title>
<note><para>This version of Nix uses Berkeley DB 4.4 instead of 4.3.
The database is upgraded automatically, but you should be careful not
to use old versions of Nix that still use Berkeley DB 4.3. In
particular, if you use a Nix installed through Nix, you should run
<screen>
$ nix-store --clear-substitutes</screen>
first.</para></note>
<warning><para>Also, the database schema has changed slighted to fix a
performance issue (see below). When you run any Nix 0.10 command for
the first time, the database will be upgraded automatically. This is
irreversible.</para></warning>
<itemizedlist>
<!-- Usability / features -->
<listitem><para><command>nix-env</command> usability improvements:
<itemizedlist>
<listitem><para>An option <option>--compare-versions</option>
(or <option>-c</option>) has been added to <command>nix-env
--query</command> to allow you to compare installed versions of
packages to available versions, or vice versa. An easy way to
see if you are up to date with what’s in your subscribed
channels is <literal>nix-env -qc \*</literal>.</para></listitem>
<listitem><para><literal>nix-env --query</literal> now takes as
arguments a list of package names about which to show
information, just like <option>--install</option>, etc.: for
example, <literal>nix-env -q gcc</literal>. Note that to show
all derivations, you need to specify
<literal>\*</literal>.</para></listitem>
<listitem><para><literal>nix-env -i
<replaceable>pkgname</replaceable></literal> will now install
the highest available version of
<replaceable>pkgname</replaceable>, rather than installing all
available versions (which would probably give collisions)
(<literal>NIX-31</literal>).</para></listitem>
<listitem><para><literal>nix-env (-i|-u) --dry-run</literal> now
shows exactly which missing paths will be built or
substituted.</para></listitem>
<listitem><para><literal>nix-env -qa --description</literal>
shows human-readable descriptions of packages, provided that
they have a <literal>meta.description</literal> attribute (which
most packages in Nixpkgs don’t have yet).</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>New language features:
<itemizedlist>
<listitem><para>Reference scanning (which happens after each
build) is much faster and takes a constant amount of
memory.</para></listitem>
<listitem><para>String interpolation. Expressions like
<programlisting>
"--with-freetype2-library=" + freetype + "/lib"</programlisting>
can now be written as
<programlisting>
"--with-freetype2-library=${freetype}/lib"</programlisting>
You can write arbitrary expressions within
<literal>${<replaceable>...</replaceable>}</literal>, not just
identifiers.</para></listitem>
<listitem><para>Multi-line string literals.</para></listitem>
<listitem><para>String concatenations can now involve
derivations, as in the example <code>"--with-freetype2-library="
+ freetype + "/lib"</code>. This was not previously possible
because we need to register that a derivation that uses such a
string is dependent on <literal>freetype</literal>. The
evaluator now properly propagates this information.
Consequently, the subpath operator (<literal>~</literal>) has
been deprecated.</para></listitem>
<listitem><para>Default values of function arguments can now
refer to other function arguments; that is, all arguments are in
scope in the default values
(<literal>NIX-45</literal>).</para></listitem>
<!--
<listitem><para>TODO: domain checks (r5895).</para></listitem>
-->
<listitem><para>Lots of new built-in primitives, such as
functions for list manipulation and integer arithmetic. See the
manual for a complete list. All primops are now available in
the set <varname>builtins</varname>, allowing one to test for
the availability of primop in a backwards-compatible
way.</para></listitem>
<listitem><para>Real let-expressions: <literal>let x = ...;
... z = ...; in ...</literal>.</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>New commands <command>nix-pack-closure</command> and
<command>nix-unpack-closure</command> than can be used to easily
transfer a store path with all its dependencies to another machine.
Very convenient whenever you have some package on your machine and
you want to copy it somewhere else.</para></listitem>
<listitem><para>XML support:
<itemizedlist>
<listitem><para><literal>nix-env -q --xml</literal> prints the
installed or available packages in an XML representation for
easy processing by other tools.</para></listitem>
<listitem><para><literal>nix-instantiate --eval-only
--xml</literal> prints an XML representation of the resulting
term. (The new flag <option>--strict</option> forces ‘deep’
evaluation of the result, i.e., list elements and attributes are
evaluated recursively.)</para></listitem>
<listitem><para>In Nix expressions, the primop
<function>builtins.toXML</function> converts a term to an XML
representation. This is primarily useful for passing structured
information to builders.</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>You can now unambigously specify which derivation to
build or install in <command>nix-env</command>,
<command>nix-instantiate</command> and <command>nix-build</command>
using the <option>--attr</option> / <option>-A</option> flags, which
takes an attribute name as argument. (Unlike symbolic package names
such as <literal>subversion-1.4.0</literal>, attribute names in an
attribute set are unique.) For instance, a quick way to perform a
test build of a package in Nixpkgs is <literal>nix-build
pkgs/top-level/all-packages.nix -A
<replaceable>foo</replaceable></literal>. <literal>nix-env -q
--attr</literal> shows the attribute names corresponding to each
derivation.</para></listitem>
<listitem><para>If the top-level Nix expression used by
<command>nix-env</command>, <command>nix-instantiate</command> or
<command>nix-build</command> evaluates to a function whose arguments
all have default values, the function will be called automatically.
Also, the new command-line switch <option>--arg
<replaceable>name</replaceable>
<replaceable>value</replaceable></option> can be used to specify
function arguments on the command line.</para></listitem>
<listitem><para><literal>nix-install-package --url
<replaceable>URL</replaceable></literal> allows a package to be
installed directly from the given URL.</para></listitem>
<listitem><para>Nix now works behind an HTTP proxy server; just set
the standard environment variables <envar>http_proxy</envar>,
<envar>https_proxy</envar>, <envar>ftp_proxy</envar> or
<envar>all_proxy</envar> appropriately. Functions such as
<function>fetchurl</function> in Nixpkgs also respect these
variables.</para></listitem>
<listitem><para><literal>nix-build -o
<replaceable>symlink</replaceable></literal> allows the symlink to
the build result to be named something other than
<literal>result</literal>.</para></listitem>
<!-- Stability / performance / etc. -->
<listitem><para>Platform support:
<itemizedlist>
<listitem><para>Support for 64-bit platforms, provided a <link
xlink:href="http://bugzilla.sen.cwi.nl:8080/show_bug.cgi?id=606">suitably
patched ATerm library</link> is used. Also, files larger than 2
GiB are now supported.</para></listitem>
<listitem><para>Added support for Cygwin (Windows,
<literal>i686-cygwin</literal>), Mac OS X on Intel
(<literal>i686-darwin</literal>) and Linux on PowerPC
(<literal>powerpc-linux</literal>).</para></listitem>
<listitem><para>Users of SMP and multicore machines will
appreciate that the number of builds to be performed in parallel
can now be specified in the configuration file in the
<literal>build-max-jobs</literal> setting.</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>Garbage collector improvements:
<itemizedlist>
<listitem><para>Open files (such as running programs) are now
used as roots of the garbage collector. This prevents programs
that have been uninstalled from being garbage collected while
they are still running. The script that detects these
additional runtime roots
(<filename>find-runtime-roots.pl</filename>) is inherently
system-specific, but it should work on Linux and on all
platforms that have the <command>lsof</command>
utility.</para></listitem>
<listitem><para><literal>nix-store --gc</literal>
(a.k.a. <command>nix-collect-garbage</command>) prints out the
number of bytes freed on standard output. <literal>nix-store
--gc --print-dead</literal> shows how many bytes would be freed
by an actual garbage collection.</para></listitem>
<listitem><para><literal>nix-collect-garbage -d</literal>
removes all old generations of <emphasis>all</emphasis> profiles
before calling the actual garbage collector (<literal>nix-store
--gc</literal>). This is an easy way to get rid of all old
packages in the Nix store.</para></listitem>
<listitem><para><command>nix-store</command> now has an
operation <option>--delete</option> to delete specific paths
from the Nix store. It won’t delete reachable (non-garbage)
paths unless <option>--ignore-liveness</option> is
specified.</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>Berkeley DB 4.4’s process registry feature is used
to recover from crashed Nix processes.</para></listitem>
<!-- <listitem><para>TODO: shared stores.</para></listitem> -->
<listitem><para>A performance issue has been fixed with the
<literal>referer</literal> table, which stores the inverse of the
<literal>references</literal> table (i.e., it tells you what store
paths refer to a given path). Maintaining this table could take a
quadratic amount of time, as well as a quadratic amount of Berkeley
DB log file space (in particular when running the garbage collector)
(<literal>NIX-23</literal>).</para></listitem>
<listitem><para>Nix now catches the <literal>TERM</literal> and
<literal>HUP</literal> signals in addition to the
<literal>INT</literal> signal. So you can now do a <literal>killall
nix-store</literal> without triggering a database
recovery.</para></listitem>
<listitem><para><command>bsdiff</command> updated to version
4.3.</para></listitem>
<listitem><para>Substantial performance improvements in expression
evaluation and <literal>nix-env -qa</literal>, all thanks to <link
xlink:href="http://valgrind.org/">Valgrind</link>. Memory use has
been reduced by a factor 8 or so. Big speedup by memoisation of
path hashing.</para></listitem>
<listitem><para>Lots of bug fixes, notably:
<itemizedlist>
<listitem><para>Make sure that the garbage collector can run
succesfully when the disk is full
(<literal>NIX-18</literal>).</para></listitem>
<listitem><para><command>nix-env</command> now locks the profile
to prevent races between concurrent <command>nix-env</command>
operations on the same profile
(<literal>NIX-7</literal>).</para></listitem>
<listitem><para>Removed misleading messages from
<literal>nix-env -i</literal> (e.g., <literal>installing
`foo'</literal> followed by <literal>uninstalling
`foo'</literal>) (<literal>NIX-17</literal>).</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>Nix source distributions are a lot smaller now since
we no longer include a full copy of the Berkeley DB source
distribution (but only the bits we need).</para></listitem>
<listitem><para>Header files are now installed so that external
programs can use the Nix libraries.</para></listitem>
</itemizedlist>
</section>
<!--==================================================================-->
<section><title>Release 0.9.2 (September 21, 2005)</title>
<para>This bug fix release fixes two problems on Mac OS X:
<itemizedlist>
<listitem><para>If Nix was linked against statically linked versions
of the ATerm or Berkeley DB library, there would be dynamic link
errors at runtime.</para></listitem>
<listitem><para><command>nix-pull</command> and
<command>nix-push</command> intermittently failed due to race
conditions involving pipes and child processes with error messages
such as <literal>open2: open(GLOB(0x180b2e4), >&=9) failed: Bad
file descriptor at /nix/bin/nix-pull line 77</literal> (issue
<literal>NIX-14</literal>).</para></listitem>
</itemizedlist>
</para>
</section>
<!--==================================================================-->
<section><title>Release 0.9.1 (September 20, 2005)</title>
<para>This bug fix release addresses a problem with the ATerm library
when the <option>--with-aterm</option> flag in
<command>configure</command> was <emphasis>not</emphasis> used.</para>
</section>
<!--==================================================================-->
<section><title>Release 0.9 (September 16, 2005)</title>
<para>NOTE: this version of Nix uses Berkeley DB 4.3 instead of 4.2.
The database is upgraded automatically, but you should be careful not
to use old versions of Nix that still use Berkeley DB 4.2. In
particular, if you use a Nix installed through Nix, you should run
<screen>
$ nix-store --clear-substitutes</screen>
first.</para>
<itemizedlist>
<listitem><para>Unpacking of patch sequences is much faster now
since we no longer do redundant unpacking and repacking of
intermediate paths.</para></listitem>
<listitem><para>Nix now uses Berkeley DB 4.3.</para></listitem>
<listitem><para>The <function>derivation</function> primitive is
lazier. Attributes of dependent derivations can mutually refer to
each other (as long as there are no data dependencies on the
<varname>outPath</varname> and <varname>drvPath</varname> attributes
computed by <function>derivation</function>).</para>
<para>For example, the expression <literal>derivation
attrs</literal> now evaluates to (essentially)
<programlisting>
attrs // {
type = "derivation";
outPath = derivation! attrs;
drvPath = derivation! attrs;
}</programlisting>
where <function>derivation!</function> is a primop that does the
actual derivation instantiation (i.e., it does what
<function>derivation</function> used to do). The advantage is that
it allows commands such as <command>nix-env -qa</command> and
<command>nix-env -i</command> to be much faster since they no longer
need to instantiate all derivations, just the
<varname>name</varname> attribute.</para>
<para>Also, it allows derivations to cyclically reference each
other, for example,
<programlisting>
webServer = derivation {
...
hostName = "svn.cs.uu.nl";
services = [svnService];
};
 
svnService = derivation {
...
hostName = webServer.hostName;
};</programlisting>
Previously, this would yield a black hole (infinite recursion).</para>
</listitem>
<listitem><para><command>nix-build</command> now defaults to using
<filename>./default.nix</filename> if no Nix expression is
specified.</para></listitem>
<listitem><para><command>nix-instantiate</command>, when applied to
a Nix expression that evaluates to a function, will call the
function automatically if all its arguments have
defaults.</para></listitem>
<listitem><para>Nix now uses libtool to build dynamic libraries.
This reduces the size of executables.</para></listitem>
<listitem><para>A new list concatenation operator
<literal>++</literal>. For example, <literal>[1 2 3] ++ [4 5
6]</literal> evaluates to <literal>[1 2 3 4 5
6]</literal>.</para></listitem>
<listitem><para>Some currently undocumented primops to support
low-level build management using Nix (i.e., using Nix as a Make
replacement). See the commit messages for <literal>r3578</literal>
and <literal>r3580</literal>.</para></listitem>
<listitem><para>Various bug fixes and performance
improvements.</para></listitem>
</itemizedlist>
</section>
<!--==================================================================-->
<section><title>Release 0.8.1 (April 13, 2005)</title>
<para>This is a bug fix release.</para>
<itemizedlist>
<listitem><para>Patch downloading was broken.</para></listitem>
<listitem><para>The garbage collector would not delete paths that
had references from invalid (but substitutable)
paths.</para></listitem>
</itemizedlist>
</section>
<!--==================================================================-->
<section><title>Release 0.8 (April 11, 2005)</title>
<para>NOTE: the hashing scheme in Nix 0.8 changed (as detailed below).
As a result, <command>nix-pull</command> manifests and channels built
for Nix 0.7 and below will now work anymore. However, the Nix
expression language has not changed, so you can still build from
source. Also, existing user environments continue to work. Nix 0.8
will automatically upgrade the database schema of previous
installations when it is first run.</para>
<para>If you get the error message
<screen>
you have an old-style manifest `/nix/var/nix/manifests/[...]'; please
delete it</screen>
you should delete previously downloaded manifests:
<screen>
$ rm /nix/var/nix/manifests/*</screen>
If <command>nix-channel</command> gives the error message
<screen>
manifest `http://catamaran.labs.cs.uu.nl/dist/nix/channels/[channel]/MANIFEST'
is too old (i.e., for Nix <= 0.7)</screen>
then you should unsubscribe from the offending channel
(<command>nix-channel --remove
<replaceable>URL</replaceable></command>; leave out
<literal>/MANIFEST</literal>), and subscribe to the same URL, with
<literal>channels</literal> replaced by <literal>channels-v3</literal>
(e.g., <link
xlink:href='http://catamaran.labs.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable'
/>).</para>
<para>Nix 0.8 has the following improvements:
<itemizedlist>
<listitem><para>The cryptographic hashes used in store paths are now
160 bits long, but encoded in base-32 so that they are still only 32
characters long (e.g.,
<filename>/nix/store/csw87wag8bqlqk7ipllbwypb14xainap-atk-1.9.0</filename>).
(This is actually a 160 bit truncation of a SHA-256
hash.)</para></listitem>
<listitem><para>Big cleanups and simplifications of the basic store
semantics. The notion of “closure store expressions” is gone (and
so is the notion of “successors”); the file system references of a
store path are now just stored in the database.</para>
<para>For instance, given any store path, you can query its closure:
<screen>
$ nix-store -qR $(which firefox)
... lots of paths ...</screen>
Also, Nix now remembers for each store path the derivation that
built it (the “deriver”):
<screen>
$ nix-store -qR $(which firefox)
/nix/store/4b0jx7vq80l9aqcnkszxhymsf1ffa5jd-firefox-1.0.1.drv</screen>
So to see the build-time dependencies, you can do
<screen>
$ nix-store -qR $(nix-store -qd $(which firefox))</screen>
or, in a nicer format:
<screen>
$ nix-store -q --tree $(nix-store -qd $(which firefox))</screen>
</para>
<para>File system references are also stored in reverse. For
instance, you can query all paths that directly or indirectly use a
certain Glibc:
<screen>
$ nix-store -q --referrers-closure \
/nix/store/8lz9yc6zgmc0vlqmn2ipcpkjlmbi51vv-glibc-2.3.4</screen>
</para>
</listitem>
<listitem><para>The concept of fixed-output derivations has been
formalised. Previously, functions such as
<function>fetchurl</function> in Nixpkgs used a hack (namely,
explicitly specifying a store path hash) to prevent changes to, say,
the URL of the file from propagating upwards through the dependency
graph, causing rebuilds of everything. This can now be done cleanly
by specifying the <varname>outputHash</varname> and
<varname>outputHashAlgo</varname> attributes. Nix itself checks
that the content of the output has the specified hash. (This is
important for maintaining certain invariants necessary for future
work on secure shared stores.)</para></listitem>
<listitem><para>One-click installation :-) It is now possible to
install any top-level component in Nixpkgs directly, through the web
— see, e.g., <link
xlink:href='http://catamaran.labs.cs.uu.nl/dist/nixpkgs-0.8/' />.
All you have to do is associate
<filename>/nix/bin/nix-install-package</filename> with the MIME type
<literal>application/nix-package</literal> (or the extension
<filename>.nixpkg</filename>), and clicking on a package link will
cause it to be installed, with all appropriate dependencies. If you
just want to install some specific application, this is easier than
subscribing to a channel.</para></listitem>
<listitem><para><command>nix-store -r
<replaceable>PATHS</replaceable></command> now builds all the
derivations PATHS in parallel. Previously it did them sequentially
(though exploiting possible parallelism between subderivations).
This is nice for build farms.</para></listitem>
<listitem><para><command>nix-channel</command> has new operations
<option>--list</option> and
<option>--remove</option>.</para></listitem>
<listitem><para>New ways of installing components into user
environments:
<itemizedlist>
<listitem><para>Copy from another user environment:
<screen>
$ nix-env -i --from-profile .../other-profile firefox</screen>
</para></listitem>
<listitem><para>Install a store derivation directly (bypassing the
Nix expression language entirely):
<screen>
$ nix-env -i /nix/store/z58v41v21xd3...-aterm-2.3.1.drv</screen>
(This is used to implement <command>nix-install-package</command>,
which is therefore immune to evolution in the Nix expression
language.)</para></listitem>
<listitem><para>Install an already built store path directly:
<screen>
$ nix-env -i /nix/store/hsyj5pbn0d9i...-aterm-2.3.1</screen>
</para></listitem>
<listitem><para>Install the result of a Nix expression specified
as a command-line argument:
<screen>
$ nix-env -f .../i686-linux.nix -i -E 'x: x.firefoxWrapper'</screen>
The difference with the normal installation mode is that
<option>-E</option> does not use the <varname>name</varname>
attributes of derivations. Therefore, this can be used to
disambiguate multiple derivations with the same
name.</para></listitem>
</itemizedlist></para></listitem>
<listitem><para>A hash of the contents of a store path is now stored
in the database after a succesful build. This allows you to check
whether store paths have been tampered with: <command>nix-store
--verify --check-contents</command>.</para></listitem>
<listitem>
<para>Implemented a concurrent garbage collector. It is now
always safe to run the garbage collector, even if other Nix
operations are happening simultaneously.</para>
<para>However, there can still be GC races if you use
<command>nix-instantiate</command> and <command>nix-store
--realise</command> directly to build things. To prevent races,
use the <option>--add-root</option> flag of those commands.</para>
</listitem>
<listitem><para>The garbage collector now finally deletes paths in
the right order (i.e., topologically sorted under the “references”
relation), thus making it safe to interrupt the collector without
risking a store that violates the closure
invariant.</para></listitem>
<listitem><para>Likewise, the substitute mechanism now downloads
files in the right order, thus preserving the closure invariant at
all times.</para></listitem>
<listitem><para>The result of <command>nix-build</command> is now
registered as a root of the garbage collector. If the
<filename>./result</filename> link is deleted, the GC root
disappears automatically.</para></listitem>
<listitem>
<para>The behaviour of the garbage collector can be changed
globally by setting options in
<filename>/nix/etc/nix/nix.conf</filename>.
<itemizedlist>
<listitem><para><literal>gc-keep-derivations</literal> specifies
whether deriver links should be followed when searching for live
paths.</para></listitem>
<listitem><para><literal>gc-keep-outputs</literal> specifies
whether outputs of derivations should be followed when searching
for live paths.</para></listitem>
<listitem><para><literal>env-keep-derivations</literal>
specifies whether user environments should store the paths of
derivations when they are added (thus keeping the derivations
alive).</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>New <command>nix-env</command> query flags
<option>--drv-path</option> and
<option>--out-path</option>.</para></listitem>
<listitem><para><command>fetchurl</command> allows SHA-1 and SHA-256
in addition to MD5. Just specify the attribute
<varname>sha1</varname> or <varname>sha256</varname> instead of
<varname>md5</varname>.</para></listitem>
<listitem><para>Manual updates.</para></listitem>
</itemizedlist>
</para>
</section>
<!--==================================================================-->
<section><title>Release 0.7 (January 12, 2005)</title>
<itemizedlist>
<listitem><para>Binary patching. When upgrading components using
pre-built binaries (through nix-pull / nix-channel), Nix can
automatically download and apply binary patches to already installed
components instead of full downloads. Patching is “smart”: if there
is a <emphasis>sequence</emphasis> of patches to an installed
component, Nix will use it. Patches are currently generated
automatically between Nixpkgs (pre-)releases.</para></listitem>
<listitem><para>Simplifications to the substitute
mechanism.</para></listitem>
<listitem><para>Nix-pull now stores downloaded manifests in
<filename>/nix/var/nix/manifests</filename>.</para></listitem>
<listitem><para>Metadata on files in the Nix store is canonicalised
after builds: the last-modified timestamp is set to 0 (00:00:00
1/1/1970), the mode is set to 0444 or 0555 (readable and possibly
executable by all; setuid/setgid bits are dropped), and the group is
set to the default. This ensures that the result of a build and an
installation through a substitute is the same; and that timestamp
dependencies are revealed.</para></listitem>
</itemizedlist>
</section>
<!--==================================================================-->
<section><title>Release 0.6 (November 14, 2004)</title>
<itemizedlist>
<listitem>
<para>Rewrite of the normalisation engine.
<itemizedlist>
<listitem><para>Multiple builds can now be performed in parallel
(option <option>-j</option>).</para></listitem>
<listitem><para>Distributed builds. Nix can now call a shell
script to forward builds to Nix installations on remote
machines, which may or may not be of the same platform
type.</para></listitem>
<listitem><para>Option <option>--fallback</option> allows
recovery from broken substitutes.</para></listitem>
<listitem><para>Option <option>--keep-going</option> causes
building of other (unaffected) derivations to continue if one
failed.</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>Improvements to the garbage collector (i.e., it
should actually work now).</para></listitem>
<listitem><para>Setuid Nix installations allow a Nix store to be
shared among multiple users.</para></listitem>
<listitem><para>Substitute registration is much faster
now.</para></listitem>
<listitem><para>A utility <command>nix-build</command> to build a
Nix expression and create a symlink to the result int the current
directory; useful for testing Nix derivations.</para></listitem>
<listitem><para>Manual updates.</para></listitem>
<listitem>
<para><command>nix-env</command> changes:
<itemizedlist>
<listitem><para>Derivations for other platforms are filtered out
(which can be overriden using
<option>--system-filter</option>).</para></listitem>
<listitem><para><option>--install</option> by default now
uninstall previous derivations with the same
name.</para></listitem>
<listitem><para><option>--upgrade</option> allows upgrading to a
specific version.</para></listitem>
<listitem><para>New operation
<option>--delete-generations</option> to remove profile
generations (necessary for effective garbage
collection).</para></listitem>
<listitem><para>Nicer output (sorted,
columnised).</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>More sensible verbosity levels all around (builder
output is now shown always, unless <option>-Q</option> is
given).</para></listitem>
<listitem>
<para>Nix expression language changes:
<itemizedlist>
<listitem><para>New language construct: <literal>with
<replaceable>E1</replaceable>;
<replaceable>E2</replaceable></literal> brings all attributes
defined in the attribute set <replaceable>E1</replaceable> in
scope in <replaceable>E2</replaceable>.</para></listitem>
<listitem><para>Added a <function>map</function>
function.</para></listitem>
<listitem><para>Various new operators (e.g., string
concatenation).</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>Expression evaluation is much
faster.</para></listitem>
<listitem><para>An Emacs mode for editing Nix expressions (with
syntax highlighting and indentation) has been
added.</para></listitem>
<listitem><para>Many bug fixes.</para></listitem>
</itemizedlist>
</section>
<!--==================================================================-->
<section><title>Release 0.5 and earlier</title>
<para>Please refer to the Subversion commit log messages.</para>
</section>
</article>
|