diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 2840194..ce7462a 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -171,11 +171,9 @@ static void worker( auto drvPath = drv->queryDrvPath(); - nlohmann::json job; - - job["nixName"] = drv->queryName(); - job["system"] =drv->querySystem(); - job["drvPath"] = drvPath; + reply["name"] = drv->queryName(); + reply["system"] = drv->querySystem(); + reply["drvPath"] = drvPath; nlohmann::json meta; for (auto & name : drv->queryMetaNames()) { @@ -193,7 +191,6 @@ static void worker( nlohmann::json field = nlohmann::json::parse(ss.str()); meta[name] = field; } - job["meta"] = meta; /* Register the derivation as a GC root. !!! This registers roots for jobs that we may have already @@ -206,14 +203,6 @@ static void worker( localStore->addPermRoot(storePath, root); } - DrvInfo::Outputs outputs = drv->queryOutputs(); - nlohmann::json out; - for (auto & p : outputs) { - out[p.first] = p.second; - } - job["outputs"] = std::move(out); - - reply["job"] = std::move(job); } else if (v->type() == nAttrs) diff --git a/tests/test_eval.py b/tests/test_eval.py index 7f5e2bf..7e32d7a 100644 --- a/tests/test_eval.py +++ b/tests/test_eval.py @@ -27,12 +27,12 @@ def common_test(extra_args: List[str]) -> None: built_job = results[0] assert built_job["attr"] == "builtJob" - assert built_job["job"]["nixName"] == "job1" + assert built_job["name"] == "job1" substituted_job = results[1] assert substituted_job["attr"] == "substitutedJob" - assert substituted_job["job"]["nixName"].startswith("hello-") + assert substituted_job["name"].startswith("hello-") def test_flake() -> None: