Skip to content

Commit

Permalink
nix-eval-jobs should check hydraJobs and then checks with flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Dec 11, 2024
1 parent 68aadc4 commit 5833e12
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/script/hydra-eval-jobset
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 5833e12

Please sign in to comment.