Commit | Line | Data |
---|---|---|
36457566 LC |
1 | #pragma once |
2 | ||
3 | #include "derivations.hh" | |
4 | ||
5 | ||
6 | namespace nix { | |
7 | ||
8 | ||
9 | /* Read a derivation, after ensuring its existence through | |
10 | ensurePath(). */ | |
11 | Derivation derivationFromPath(StoreAPI & store, const Path & drvPath); | |
12 | ||
13 | /* Place in `paths' the set of all store paths in the file system | |
14 | closure of `storePath'; that is, all paths than can be directly or | |
15 | indirectly reached from it. `paths' is not cleared. If | |
16 | `flipDirection' is true, the set of paths that can reach | |
17 | `storePath' is returned; that is, the closures under the | |
18 | `referrers' relation instead of the `references' relation is | |
19 | returned. */ | |
20 | void computeFSClosure(StoreAPI & store, const Path & path, | |
21 | PathSet & paths, bool flipDirection = false, | |
22 | bool includeOutputs = false, bool includeDerivers = false); | |
23 | ||
24 | /* Return the path corresponding to the output identifier `id' in the | |
25 | given derivation. */ | |
26 | Path findOutput(const Derivation & drv, string id); | |
27 | ||
36457566 LC |
28 | bool willBuildLocally(const Derivation & drv); |
29 | ||
322eeb87 LC |
30 | bool substitutesAllowed(const Derivation & drv); |
31 | ||
36457566 LC |
32 | |
33 | } |