misc.hh 881 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "derivations.hh"
  3. namespace nix {
  4. /* Read a derivation, after ensuring its existence through
  5. ensurePath(). */
  6. Derivation derivationFromPath(StoreAPI & store, const Path & drvPath);
  7. /* Place in `paths' the set of all store paths in the file system
  8. closure of `storePath'; that is, all paths than can be directly or
  9. indirectly reached from it. `paths' is not cleared. If
  10. `flipDirection' is true, the set of paths that can reach
  11. `storePath' is returned; that is, the closures under the
  12. `referrers' relation instead of the `references' relation is
  13. returned. */
  14. void computeFSClosure(StoreAPI & store, const Path & path,
  15. PathSet & paths, bool flipDirection = false,
  16. bool includeOutputs = false, bool includeDerivers = false);
  17. bool willBuildLocally(const Derivation & drv);
  18. bool substitutesAllowed(const Derivation & drv);
  19. }