NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.17k stars 300 forks source link

Deduplicate with `nix-eval-jobs` #1315

Open Ericson2314 opened 10 months ago

Ericson2314 commented 10 months ago

https://github.com/nix-community/nix-eval-jobs was forked from Hydra, because it is nice to be able to evaluate exactly as Hydra does outside of Hydra. This is a virtuous goal in my view --- a core Nix philosophy is that "everything CI does one should be able to do locally", without running Hydra locally of course.

But unfortunately Hydra still has its own hydra-eval-jobs, which means that we have two sources of truth now --- nix-eval-jobs and hydra-eval-jobs --- and nothing stops them from diverging. This is not good, and puts the original goes (do what hydra does locally without Hydra) at risk! The risk is not hypothetical: https://github.com/NixOS/hydra/pull/875 changes hydra-eval-jobs to support CA derivations, and I wouldn't want nix-eval-jobs to not have this first (or, if it already does, add another implementation).

Here area a couple options on how to fix this:

  1. Make hydra depend on nix-eval-jobs. It is just an out of tree executable it will know how to use.
  2. Make the in-tree thing nix-eval-jobs, and make sure it is possible to build in isolation. Converting Hydra to use Meson (#1392), like nix-eval-jobs does, could possibly help with this.