about summary refs log tree commit diff
path: root/src/libstore/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r--src/libstore/misc.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc
index b442bd4c2157..6849e2c1a64c 100644
--- a/src/libstore/misc.cc
+++ b/src/libstore/misc.cc
@@ -1,6 +1,5 @@
 #include "misc.hh"
 #include "store-api.hh"
-#include "build.hh"
 #include "db.hh"
 
 #include <aterm2.h>
@@ -12,7 +11,7 @@ namespace nix {
 Derivation derivationFromPath(const Path & drvPath)
 {
     assertStorePath(drvPath);
-    ensurePath(drvPath);
+    store->ensurePath(drvPath);
     ATerm t = ATreadFromNamedFile(drvPath.c_str());
     if (!t) throw Error(format("cannot read aterm from `%1%'") % drvPath);
     return parseDerivation(t);