From d36d77c8737f88bb801a2799c5c81282a04987a3 Mon Sep 17 00:00:00 2001 From: Tom Bereknyei Date: Tue, 4 Jan 2022 03:43:06 -0500 Subject: [PATCH] use outPath --- src/nix-eval-jobs.cc | 5 ++++- tests/test_eval.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 8ee192a..996d5f2 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -173,11 +173,14 @@ static void worker( auto drvPath = drv->queryDrvPath(); auto localStore = state.store.dynamic_pointer_cast(); 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()) { diff --git a/tests/test_eval.py b/tests/test_eval.py index 404985c..7df722a 100644 --- a/tests/test_eval.py +++ b/tests/test_eval.py @@ -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")