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";