diff options
Diffstat (limited to 'third_party/nix/src/libstore/store-api.hh')
-rw-r--r-- | third_party/nix/src/libstore/store-api.hh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/third_party/nix/src/libstore/store-api.hh b/third_party/nix/src/libstore/store-api.hh index 1d81b228f292..bb2f1a950bfd 100644 --- a/third_party/nix/src/libstore/store-api.hh +++ b/third_party/nix/src/libstore/store-api.hh @@ -348,8 +348,12 @@ class Store : public std::enable_shared_from_this<Store>, public Config { public: /* Query which of the given paths is valid. Optionally, try to substitute missing paths. */ - virtual PathSet queryValidPaths( - const PathSet& paths, SubstituteFlag maybeSubstitute = NoSubstitute); + virtual PathSet queryValidPaths(const PathSet& paths, + SubstituteFlag maybeSubstitute); + + PathSet queryValidPaths(const PathSet& paths) { + return queryValidPaths(paths, NoSubstitute); + } /* Query the set of all valid paths. Note that for some store backends, the name part of store paths may be omitted @@ -452,14 +456,22 @@ class Store : public std::enable_shared_from_this<Store>, public Config { recursively building any sub-derivations. For inputs that are not derivations, substitute them. */ [[nodiscard]] virtual absl::Status buildPaths(const PathSet& paths, - BuildMode buildMode = bmNormal); + BuildMode buildMode); + + [[nodiscard]] absl::Status buildPaths(const PathSet& paths) { + return buildPaths(paths, bmNormal); + } /* Build a single non-materialized derivation (i.e. not from an on-disk .drv file). Note that ‘drvPath’ is only used for informational purposes. */ virtual BuildResult buildDerivation(const Path& drvPath, const BasicDerivation& drv, - BuildMode buildMode = bmNormal) = 0; + BuildMode buildMode) = 0; + + BuildResult buildDerivation(const Path& drvPath, const BasicDerivation& drv) { + return buildDerivation(drvPath, drv, bmNormal); + } /* Ensure that a path is valid. If it is not currently valid, it may be made valid by running a substitute (if defined for the |