Merge pull request #16 from tomberek/outPath

use outPath
This commit is contained in:
Jörg Thalheim 2022-01-05 23:20:38 +00:00 committed by GitHub
commit 0570194d0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -173,11 +173,14 @@ static void worker(
auto drvPath = drv->queryDrvPath();
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>();
auto storePath = localStore->parseStorePath(drvPath);
auto outputs = drv->queryOutputs(false);
reply["name"] = drv->queryName();
reply["system"] = drv->querySystem();
reply["drvPath"] = drvPath;
reply["storePath"] = localStore->printStorePath(storePath);
for (auto out : outputs){
reply["outputs"][out.first] = out.second;
}
nlohmann::json meta;
for (auto & name : drv->queryMetaNames()) {

View file

@ -28,7 +28,7 @@ def common_test(extra_args: List[str]) -> None:
built_job = results[0]
assert built_job["attr"] == "builtJob"
assert built_job["name"] == "job1"
assert built_job["storePath"].startswith("/nix/store")
assert built_job["outputs"]["out"].startswith("/nix/store")
assert built_job["drvPath"].endswith(".drv")