about summary refs log tree commit diff
path: root/src/libstore/derivations.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T19·09-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T19·09-0400
commit0a7084567fc4e7d077863075a7ea1bb82d843341 (patch)
tree4868d450da1e153b0660eede85105cb2b14d0859 /src/libstore/derivations.cc
parenta807edfae8428bf426ee6ae849a7a24d74d39202 (diff)
Add a ‘--repair’ flag to nix-instantiate
This allows repairing corrupted derivations and other source files.
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r--src/libstore/derivations.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 73047c7538a0..e0a4f43c0bb8 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -27,7 +27,7 @@ void DerivationOutput::parseHashInfo(bool & recursive, HashType & hashType, Hash
 
 
 Path writeDerivation(StoreAPI & store,
-    const Derivation & drv, const string & name)
+    const Derivation & drv, const string & name, bool repair)
 {
     PathSet references;
     references.insert(drv.inputSrcs.begin(), drv.inputSrcs.end());
@@ -40,7 +40,7 @@ Path writeDerivation(StoreAPI & store,
     string contents = unparseDerivation(drv);
     return settings.readOnlyMode
         ? computeStorePathForText(suffix, contents, references)
-        : store.addTextToStore(suffix, contents, references);
+        : store.addTextToStore(suffix, contents, references, repair);
 }