struct Source { url: Str, sha256: Str = "unset" }
struct Tool { version: Str, source: Source }
struct Root { tools: Map<Str, Tool> = {} block tool }
fn hosted(repo: Str, version: Str) -> Source =
Source { url = "https://code.example.org/#{repo}/archive/v#{version}.tar.gz" }
tool query {
version = "1.7"
source = hosted("tools/query", self.version)
source.sha256 = "abc"
}