about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-08-24T09·56+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-08-24T09·56+0000
commit955d11aae738f7f9c56c51e8ab2eabdf8732aab1 (patch)
treec6a447018ba865580700e727997bb079aba4a0f4
parent5c5ab2bc12472f63a33cc841dcdc57f1ed8ddea5 (diff)
parentc67eccc26d42bce9496024ac77eaa7e4ff725d01 (diff)
* Sync with the trunk.
-rw-r--r--doc/manual/conf-file.xml19
-rw-r--r--doc/manual/manual.xml3
-rw-r--r--doc/manual/nix-push.xml2
-rw-r--r--doc/manual/opt-common-syn.xml4
-rw-r--r--doc/manual/opt-common.xml20
-rw-r--r--doc/manual/release-notes.xml53
-rw-r--r--nix.conf.example2
-rw-r--r--release.nix14
-rw-r--r--src/libstore/remote-store.cc3
-rw-r--r--src/libstore/worker-protocol.hh2
-rw-r--r--src/nix-worker/nix-worker.cc3
-rw-r--r--version2
12 files changed, 114 insertions, 13 deletions
diff --git a/doc/manual/conf-file.xml b/doc/manual/conf-file.xml
index 19e86808ec3a..cb47b99418b6 100644
--- a/doc/manual/conf-file.xml
+++ b/doc/manual/conf-file.xml
@@ -97,6 +97,25 @@ env-keep-derivations = false
   </varlistentry>
 
 
+  <varlistentry xml:id="conf-build-cores"><term><literal>build-cores</literal></term>
+
+    <listitem><para>Sets the value of the
+    <envar>NIX_BUILD_CORES</envar> environment variable in the
+    invocation of builders.  Builders can use this variable at their
+    discretion to control the maximum amount of parallelism.  For
+    instance, in Nixpkgs, if the derivation attribute
+    <varname>enableParallelBuilding</varname> is set to
+    <literal>true</literal>, the builder passes the
+    <option>-j<replaceable>N</replaceable></option> flag to GNU Make.
+    It can be overriden using the <option
+    linkend='opt-cores'>--cores</option> command line switch and
+    defaults to <literal>1</literal>.  The value <literal>0</literal>
+    means that the builder should use all available CPU cores in the
+    system.</para></listitem>
+
+  </varlistentry>
+
+
   <varlistentry xml:id="conf-build-max-silent-time"><term><literal>build-max-silent-time</literal></term>
 
     <listitem>
diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml
index df926841aa4a..090a92ce6b3e 100644
--- a/doc/manual/manual.xml
+++ b/doc/manual/manual.xml
@@ -27,10 +27,11 @@
       <year>2007</year>
       <year>2008</year>
       <year>2009</year>
+      <year>2010</year>
       <holder>Eelco Dolstra</holder>
     </copyright>
 
-    <date>September 2009</date>
+    <date>August 2010</date>
     
   </info>
 
diff --git a/doc/manual/nix-push.xml b/doc/manual/nix-push.xml
index 1435c559496f..d2a7e063e583 100644
--- a/doc/manual/nix-push.xml
+++ b/doc/manual/nix-push.xml
@@ -120,7 +120,7 @@ dependencies used in the build, such as compilers).</para>
 dependencies, we can do:
       
 <screen>
-$ nix-push <replaceable>urls</replaceable> $(nix-instantiate $(nix-store -r foo.nix))</screen>
+$ nix-push <replaceable>urls</replaceable> $(nix-store -r $(nix-instantiate foo.nix))</screen>
     
 </para>
 
diff --git a/doc/manual/opt-common-syn.xml b/doc/manual/opt-common-syn.xml
index 0412fcb6abba..da60288b2a19 100644
--- a/doc/manual/opt-common-syn.xml
+++ b/doc/manual/opt-common-syn.xml
@@ -14,6 +14,10 @@
   <replaceable>number</replaceable>
 </arg>
 <arg>
+  <arg><option>--cores</option></arg>
+  <replaceable>number</replaceable>
+</arg>
+<arg>
   <arg><option>--max-silent-time</option></arg>
   <replaceable>number</replaceable>
 </arg>
diff --git a/doc/manual/opt-common.xml b/doc/manual/opt-common.xml
index 3be9f5dd5fc3..2d67162d7cad 100644
--- a/doc/manual/opt-common.xml
+++ b/doc/manual/opt-common.xml
@@ -98,7 +98,25 @@
   linkend='conf-build-max-jobs'><literal>build-max-jobs</literal></link>
   configuration setting, which itself defaults to
   <literal>1</literal>.  A higher value is useful on SMP systems or to
-  exploit I/O latency.  </para></listitem>
+  exploit I/O latency.</para></listitem>
+  
+</varlistentry>
+
+
+<varlistentry xml:id="opt-cores"><term><option>--cores</option></term>
+
+  <listitem><para>Sets the value of the <envar>NIX_BUILD_CORES</envar>
+  environment variable in the invocation of builders.  Builders can
+  use this variable at their discretion to control the maximum amount
+  of parallelism.  For instance, in Nixpkgs, if the derivation
+  attribute <varname>enableParallelBuilding</varname> is set to
+  <literal>true</literal>, the builder passes the
+  <option>-j<replaceable>N</replaceable></option> flag to GNU Make.
+  It defaults to the value of the <link
+  linkend='conf-build-cores'><literal>build-cores</literal></link>
+  configuration setting, if set, or <literal>1</literal> otherwise.
+  The value <literal>0</literal> means that the builder should use all
+  available CPU cores in the system.</para></listitem>
   
 </varlistentry>
 
diff --git a/doc/manual/release-notes.xml b/doc/manual/release-notes.xml
index e79563440416..5b1c30bf8292 100644
--- a/doc/manual/release-notes.xml
+++ b/doc/manual/release-notes.xml
@@ -8,6 +8,59 @@
 
 <!--==================================================================-->
 
+<section xml:id="ssec-relnotes-0.16"><title>Release 0.16 (August 17, 2010)</title>
+
+<para>This release has the following improvements:</para>
+
+<itemizedlist>
+
+  <listitem>
+    <para>The Nix expression evaluator is now much faster in most
+    cases: typically, <link
+    xlink:href="http://www.mail-archive.com/nix-dev@cs.uu.nl/msg04113.html">3
+    to 8 times compared to the old implementation</link>.  It also
+    uses less memory.  It no longer depends on the ATerm
+    library.</para>
+  </listitem>
+
+  <listitem>
+    <para>
+      Support for configurable parallelism inside builders.  Build
+      scripts have always had the ability to perform multiple build
+      actions in parallel (for instance, by running <command>make -j
+      2</command>), but this was not desirable because the number of
+      actions to be performed in parallel was not configurable.  Nix
+      now has an option <option>--cores
+      <replaceable>N</replaceable></option> as well as a configuration
+      setting <varname>build-cores =
+      <replaceable>N</replaceable></varname> that causes the
+      environment variable <envar>NIX_BUILD_CORES</envar> to be set to
+      <replaceable>N</replaceable> when the builder is invoked.  The
+      builder can use this at its discretion to perform a parallel
+      build, e.g., by calling <command>make -j
+      <replaceable>N</replaceable></command>.  In Nixpkgs, this can be
+      enabled on a per-package basis by setting the derivation
+      attribute <varname>enableParallelBuilding</varname> to
+      <literal>true</literal>.
+    </para>
+  </listitem>
+
+  <listitem>
+    <para><command>nix-store -q</command> now supports XML output
+    through the <option>--xml</option> flag.</para>
+  </listitem>
+
+  <listitem>
+    <para>Several bug fixes.</para>
+  </listitem>
+
+</itemizedlist>
+
+</section>
+
+
+<!--==================================================================-->
+
 <section xml:id="ssec-relnotes-0.15"><title>Release 0.15 (March 17, 2010)</title>
 
 <para>This is a bug-fix release.  Among other things, it fixes
diff --git a/nix.conf.example b/nix.conf.example
index 7063bed54c4d..3c55b570e60f 100644
--- a/nix.conf.example
+++ b/nix.conf.example
@@ -63,7 +63,7 @@
 #
 # This option defines the number of CPU cores to utilize in parallel
 # within a build job, i.e. by passing an appropriate `-jN' flag to GNU
-# make. The default is 1, meaning that parallel building within jobs
+# Make. The default is 1, meaning that parallel building within jobs
 # is disabled.  Passing the special value `0' causes Nix to try and
 # auto-detect the number of available cores on the local host.  This
 # setting can be overridden using the `--cores' command line switch.
diff --git a/release.nix b/release.nix
index 62ac87da73b6..589d0f035e5d 100644
--- a/release.nix
+++ b/release.nix
@@ -1,5 +1,5 @@
-{ nix ? {outPath = ./.; rev = 1234;}
-, nixpkgs ? ../nixpkgs
+{ nixpkgs ? ../nixpkgs
+, nix ? { outPath = ./.; rev = 1234; }
 , officialRelease ? false
 }:
 
@@ -64,7 +64,7 @@ let
     build =
       { system ? "i686-linux" }:
 
-      with import nixpkgs {inherit system;};
+      with import nixpkgs { inherit system; };
 
       releaseTools.nixBuild {
         name = "nix";
@@ -80,7 +80,7 @@ let
 
 
     coverage =
-      with import nixpkgs {};
+      with import nixpkgs { system = "x86_64-linux"; };
 
       releaseTools.coverageAnalysis {
         name = "nix-build";
@@ -143,7 +143,7 @@ let
   makeRPM = 
     system: diskImageFun: prio:
 
-    with import nixpkgs {inherit system;};
+    with import nixpkgs { inherit system; };
 
     releaseTools.rpmBuild rec {
       name = "nix-rpm-${diskImage.name}";
@@ -160,7 +160,7 @@ let
   makeDeb =
     system: diskImageFun: prio:
 
-    with import nixpkgs {inherit system;};
+    with import nixpkgs { inherit system; };
 
     releaseTools.debBuild {
       name = "nix-deb";
@@ -169,7 +169,7 @@ let
       memSize = 1024;
       meta.schedulingPriority = prio;
       configureFlags = "--sysconfdir=/etc";
-      debRequires = ["curl"];
+      debRequires = [ "curl" ];
     };
 
 
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 93319ebb8e49..8f162daeee42 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -198,6 +198,9 @@ void RemoteStore::setOptions()
         writeInt(logType, to);
         writeInt(printBuildTrace, to);
     }
+    if (GET_PROTOCOL_MINOR(daemonVersion) >= 6) {
+        writeInt(buildCores, to);
+    }
     processStderr();
 }
 
diff --git a/src/libstore/worker-protocol.hh b/src/libstore/worker-protocol.hh
index 392a69acf654..a4dc690b74d9 100644
--- a/src/libstore/worker-protocol.hh
+++ b/src/libstore/worker-protocol.hh
@@ -8,7 +8,7 @@ namespace nix {
 #define WORKER_MAGIC_1 0x6e697863
 #define WORKER_MAGIC_2 0x6478696f
 
-#define PROTOCOL_VERSION 0x105
+#define PROTOCOL_VERSION 0x106
 #define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
 #define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
 
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index b292b83ed52c..9be733d8c748 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -502,6 +502,9 @@ static void performOp(unsigned int clientVersion,
             logType = (LogType) readInt(from);
             printBuildTrace = readInt(from) != 0;
         }
+        if (GET_PROTOCOL_MINOR(clientVersion) >= 6) {
+            buildCores = readInt(from);
+        }
         startWork();
         stopWork();
         break;
diff --git a/version b/version
index a59ac4608380..9f8e9b69a33f 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.16
\ No newline at end of file
+1.0
\ No newline at end of file