From 5833e12466dc214521e8d0d7de8801bfcd9dee94 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 11 Dec 2024 01:27:56 -0500 Subject: [PATCH] `nix-eval-jobs` should check `hydraJobs` and then `checks` with flakes --- src/script/hydra-eval-jobset | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/script/hydra-eval-jobset b/src/script/hydra-eval-jobset index 6dc1514b0..e68ce9c25 100755 --- a/src/script/hydra-eval-jobset +++ b/src/script/hydra-eval-jobset @@ -358,7 +358,15 @@ sub evalJobs { my @cmd; if (defined $flakeRef) { - @cmd = ("nix-eval-jobs", "--flake", $flakeRef . '#hydraJobs'); + my $nix_expr = + "let " . + "flake = builtins.getFlake (toString \"$flakeRef\"); " . + "in " . + "flake.hydraJobs " . + "or flake.checks" . + "or throw \"flake '$flakeRef' does not provide any Hydra jobs or checks\""; + + @cmd = ("nix-eval-jobs", "--flake", "--expr", $nix_expr); } else { my $nixExprInput = $inputInfo->{$nixExprInputName}->[0] or die "cannot find the input containing the job expression\n";