feat: enable auto-call behavior for non-Flakes entrypoints

This way, we can easily switch between any.

TODO would be to automatically filter out `incoming_ref_data` if it
doesn't appear.

Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
raito 2024-10-27 22:01:05 +01:00
parent 0ffae5766b
commit 1195ff3b28

View file

@ -475,7 +475,7 @@ def make_job_evaluator(name: str, settings: EvaluatorSettings, flake: bool, inco
actual_command += ["--flake", f".#{FLAKE_TARGET_ATTRIBUTE_FOR_JOBS}"]
else:
actual_command += ["--expr",
f"import ./.ci/buildbot.nix {{ incoming_ref_data = builtins.fromJSON (builtins.readFile {incoming_ref_filename}); }}"]
f"let fn = import ./.ci/buildbot.nix; in if (builtins.isFunction fn) then (fn {{ incoming_ref_data = builtins.fromJSON (builtins.readFile {incoming_ref_filename}); }}) else fn"]
return NixEvalCommand(
env={},