misc.hh 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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. /* Return the path corresponding to the output identifier `id' in the
  18. given derivation. */
  19. Path findOutput(const Derivation & drv, string id);
  20. bool willBuildLocally(const Derivation & drv);
  21. bool substitutesAllowed(const Derivation & drv);
  22. }