Eager mode for "nix build"?

I’m building a large tree of packages which has a number of unknown build issues in it. I’d like to execute a build that is as eager as possible so that I can discover many of these issues at once— it should chase each branch of the dependency tree to conclusion, whether that’s a success or failure.

Nix build’s default behaviour is instead to stop immediately on the first failure, even aborting in-progress builds that would have succeeded, so that they have to start over from the beginning on the next try.

Is there a flag or mode I can use to get what I’d like here?

Nix-build --keep-going?

2 Likes

Ah nice, that looks about right. I’m on a flake-centric workflow, though. Is there a way to do this with nix build, or a way to build my flake packages with nix-build?

–keep-going works with any nix command. It’s actually one of the settings you can put in nix.conf, and those always work as command line options as well.