2012-07-18 18:59:03 +00:00
|
|
|
#pragma once
|
2006-03-06 11:21:15 +00:00
|
|
|
|
|
|
|
#include "derivations.hh"
|
|
|
|
|
|
|
|
|
2006-09-04 21:06:23 +00:00
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
|
2006-03-06 11:21:15 +00:00
|
|
|
/* Read a derivation, after ensuring its existence through
|
|
|
|
ensurePath(). */
|
2011-08-31 21:11:50 +00:00
|
|
|
Derivation derivationFromPath(StoreAPI & store, const Path & drvPath);
|
2006-03-06 11:21:15 +00: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. */
|
2012-12-20 17:41:44 +00:00
|
|
|
void computeFSClosure(StoreAPI & store, const Path & path,
|
2010-01-25 17:18:44 +00:00
|
|
|
PathSet & paths, bool flipDirection = false,
|
2012-12-20 17:41:44 +00:00
|
|
|
bool includeOutputs = false, bool includeDerivers = false);
|
2006-03-06 11:21:15 +00: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 21:11:50 +00:00
|
|
|
void queryMissing(StoreAPI & store, const PathSet & targets,
|
2008-08-04 12:29:04 +00:00
|
|
|
PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown,
|
2010-11-17 14:31:42 +00:00
|
|
|
unsigned long long & downloadSize, unsigned long long & narSize);
|
2006-03-06 11:21:15 +00:00
|
|
|
|
2013-06-20 18:05:03 +00:00
|
|
|
bool willBuildLocally(const Derivation & drv);
|
2013-06-20 17:26:31 +00:00
|
|
|
|
2006-03-06 11:21:15 +00:00
|
|
|
|
2006-09-04 21:06:23 +00:00
|
|
|
}
|