I use Nix shells to give it the tools it wants.
If it wants to do system-level tests, then I make sure my project has Qemu-based tests.