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