add docstring to lookupFileArg

Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
This commit is contained in:
Qyriad 2024-05-20 13:16:09 -06:00
parent c46083426d
commit da43283e88

View file

@ -28,6 +28,21 @@ private:
std::map<std::string, std::string> autoArgs; std::map<std::string, std::string> autoArgs;
}; };
SourcePath lookupFileArg(EvalState & state, std::string_view s); /** @brief Resolve an argument that is generally a file, but could be something that
* is easy to resolve to a file, like a <lookup path> or a tarball URL.
*
* In particular, this will resolve and fetch pseudo-URLs starting with
* @c channel:, flakerefs starting with @c flake:, and anything that
* @ref nix::fetchers::downloadTarball() can take.
*
* @param state The nix::EvalState to base settings, store, and nixPath from.
*
* @param fileArg The the path-ish to resolve.
*
* @return A nix::SourcePath to the resolved and fetched file.
*
* @exception nix::FileTransferError from nix::fetchers::downloadTarball().
*/
SourcePath lookupFileArg(EvalState & state, std::string_view fileArg);
} }