NixOS/nix

flake: command to build all the derivations

Opened this issue · 3 comments

Is your feature request related to a problem? Please describe.

I couldn't find an easy way to build all the derivations of a flake. Maybe it already exists and I missed it.

Ideally, this could be filtered by available systems since most CI don't have the remote builder setup to build all the architectures in one go.

Describe the solution you'd like

nix build <flake> --all --systems x84_64-linux

Describe alternatives you've considered

I believe that the hydra evaluator might support this. But it isn't something that is widely accessible.

Additional context

This is very useful in the context of a monorepo

"All the derivations of a flake" is not well-defined since a flake can have any number of outputs, only some of which are well-known (e.g. packages and checks) so we don't know how to evaluate them. But we could add a flag to nix flake check to build all packages.

Sounds good to me.

A related item; do you remember why nix build now only builds a single derivation and nix flake check spits out errors when non-derivations live in that structure?

stale commented

I marked this as stale due to inactivity. → More info