about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc9
-rw-r--r--src/nix-store/main.cc2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 2dd8caf15af7..1ba521eb37e3 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -989,6 +989,15 @@ void DerivationGoal::startBuilder()
     /* Also set TMPDIR and variants to point to this directory. */
     env["TMPDIR"] = env["TEMPDIR"] = env["TMP"] = env["TEMP"] = tmpDir;
 
+    /* Compatibility hack with Nix <= 0.7: if this is a fixed-output
+       derivation, tell the builder, so that for instance `fetchurl'
+       can skip checking the output.  On older Nixes, this environment
+       variable won't be set, so `fetchurl' will do the check. */
+    for (DerivationOutputs::iterator i = drv.outputs.begin(); 
+         i != drv.outputs.end(); ++i)
+        if (i->second.hash != "")
+            env["NIX_OUTPUT_CHECKED"] = "1";
+
     /* Run the builder. */
     printMsg(lvlChatty, format("executing builder `%1%'") %
         drv.builder);
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc
index 545df0638d79..6e590ba06f9c 100644
--- a/src/nix-store/main.cc
+++ b/src/nix-store/main.cc
@@ -209,7 +209,7 @@ static void printDrvTree(const Path & drvPath,
          i != drv.inputDrvs.end(); ++i)
         inputs.insert(i->first);
 
-    /* Topologically sorted under the relation A < B iff A \in
+    /* Topologically sort under the relation A < B iff A \in
        closure(B).  That is, if derivation A is an (possibly indirect)
        input of B, then A is printed first.  This has the effect of
        flattening the tree, preventing deeply nested structures.  */