From 364e21919a2284db24509bf953126329d6de92bb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 28 Nov 2017 16:51:00 +0100 Subject: [PATCH] hydra-eval-{jobs,jobset}: Pass file name as <...> --- src/hydra-eval-jobs/hydra-eval-jobs.cc | 4 ++-- src/script/hydra-eval-jobset | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc index 1faccb9d..1e17e99d 100644 --- a/src/hydra-eval-jobs/hydra-eval-jobs.cc +++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc @@ -175,7 +175,7 @@ int main(int argc, char * * argv) else if (*arg != "" && arg->at(0) == '-') return false; else - releaseExpr = absPath(*arg); + releaseExpr = *arg; return true; }); @@ -197,7 +197,7 @@ int main(int argc, char * * argv) Bindings & autoArgs = *myArgs.getAutoArgs(state); Value v; - state.evalFile(releaseExpr, v); + state.evalFile(lookupFileArg(state, releaseExpr), v); JSONObject json(std::cout, true); findJobs(state, json, autoArgs, v, ""); diff --git a/src/script/hydra-eval-jobset b/src/script/hydra-eval-jobset index 4ad0ef98..075def49 100755 --- a/src/script/hydra-eval-jobset +++ b/src/script/hydra-eval-jobset @@ -358,11 +358,14 @@ sub evalJobs { or die "cannot find the input containing the job expression\n"; die "multiple alternatives for the input containing the Nix expression are not supported.\n" if scalar @{$inputInfo->{$nixExprInputName}} != 1; - my $nixExprFullPath = $nixExprInput->{storePath} . "/" . $nixExprPath; my $evaluator = ($exprType eq "guile") ? "hydra-eval-guile-jobs" : "hydra-eval-jobs"; - my @cmd = ($evaluator, $nixExprFullPath, "--gc-roots-dir", getGCRootsDir, "-j", 1, inputsToArgs($inputInfo, $exprType)); + my @cmd = ($evaluator, + "<" . $nixExprInputName . "/" . $nixExprPath . ">", + "--gc-roots-dir", getGCRootsDir, + "-j", 1, + inputsToArgs($inputInfo, $exprType)); if (defined $ENV{'HYDRA_DEBUG'}) { sub escape {