How to make `nix build` have stdout message like `nix-build`?

nix-build tends to print all the lines in stdout while nix build keep refreshing the build logs in the last line, that means I cannot know what happen during the process.
How can I make nix build also print all the lines of build logs, something like nix-build stdout?

You can add --print-build-logs as an argument to nix build to get the build logs. You might also want to add -v to get messages like

copying path '/nix/store/5g84qbana3gc1i1z17i4vynmk0awhgv6-electron-unwrapped-42.7.1' from 'https://cache.nixos.org'...
building '/nix/store/54gvpn9ryanblc6zi07a6a2wqd01gcfn-system-path.drv'...

Yes, thats it. thank you so much!

The short form of that is -L, so with more sufficient verbosity, -Lv should suffice.

1 Like

Lv is too luxury for me!