2012-07-18 20:59:03 +02:00
|
|
|
#pragma once
|
2006-03-06 12:21:15 +01:00
|
|
|
|
|
|
|
#include "derivations.hh"
|
|
|
|
|
|
|
|
|
2006-09-04 23:06:23 +02:00
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
|
2006-03-06 12:21:15 +01:00
|
|
|
/* Read a derivation, after ensuring its existence through
|
|
|
|
ensurePath(). */
|
2011-08-31 23:11:50 +02:00
|
|
|
Derivation derivationFromPath(StoreAPI & store, const Path & drvPath);
|
2006-03-06 12:21:15 +01:00
|
|
|
|
|
|
|
/* Place in `paths' the set of all store paths in the file system
|
|
|
|
closure of `storePath'; that is, all paths than can be directly or
|
|
|
|
indirectly reached from it. `paths' is not cleared. If
|
|
|
|
`flipDirection' is true, the set of paths that can reach
|
|
|
|
`storePath' is returned; that is, the closures under the
|
|
|
|
`referrers' relation instead of the `references' relation is
|
|
|
|
returned. */
|
2011-08-31 23:11:50 +02:00
|
|
|
void computeFSClosure(StoreAPI & store, const Path & storePath,
|
2010-01-25 18:18:44 +01:00
|
|
|
PathSet & paths, bool flipDirection = false,
|
|
|
|
bool includeOutputs = false);
|
2006-03-06 12:21:15 +01:00
|
|
|
|
|
|
|
/* Return the path corresponding to the output identifier `id' in the
|
|
|
|
given derivation. */
|
|
|
|
Path findOutput(const Derivation & drv, string id);
|
|
|
|
|
|
|
|
/* Given a set of paths that are to be built, return the set of
|
|
|
|
derivations that will be built, and the set of output paths that
|
|
|
|
will be substituted. */
|
2011-08-31 23:11:50 +02:00
|
|
|
void queryMissing(StoreAPI & store, const PathSet & targets,
|
2008-08-04 14:29:04 +02:00
|
|
|
PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown,
|
2010-11-17 15:31:42 +01:00
|
|
|
unsigned long long & downloadSize, unsigned long long & narSize);
|
2006-03-06 12:21:15 +01:00
|
|
|
|
|
|
|
|
2006-09-04 23:06:23 +02:00
|
|
|
}
|