about summary refs log tree commit diff
path: root/src/libstore/derivations.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-01T12·49+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-01T14·24+0200
commit7850d3d27910c30232dd09dd86ee8afdaad26b90 (patch)
treeda539f14d98d815e89b6ad60ed8e1e1ab9981cbf /src/libstore/derivations.cc
parent1b5b654fe25cf7f2219ebe96a943397d683bfa0e (diff)
Make the store directory a member variable of Store
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r--src/libstore/derivations.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index becf852454..8067e412ad 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -81,7 +81,7 @@ Path writeDerivation(ref<Store> store,
     string suffix = name + drvExtension;
     string contents = drv.unparse();
     return settings.readOnlyMode
-        ? computeStorePathForText(suffix, contents, references)
+        ? store->computeStorePathForText(suffix, contents, references)
         : store->addTextToStore(suffix, contents, references, repair);
 }
 
@@ -336,7 +336,7 @@ PathSet BasicDerivation::outputPaths() const
 }
 
 
-Source & operator >> (Source & in, BasicDerivation & drv)
+Source & readDerivation(Source & in, Store & store, BasicDerivation & drv)
 {
     drv.outputs.clear();
     auto nr = readInt(in);
@@ -344,11 +344,11 @@ Source & operator >> (Source & in, BasicDerivation & drv)
         auto name = readString(in);
         DerivationOutput o;
         in >> o.path >> o.hashAlgo >> o.hash;
-        assertStorePath(o.path);
+        store.assertStorePath(o.path);
         drv.outputs[name] = o;
     }
 
-    drv.inputSrcs = readStorePaths<PathSet>(in);
+    drv.inputSrcs = readStorePaths<PathSet>(store, in);
     in >> drv.platform >> drv.builder;
     drv.args = readStrings<Strings>(in);