Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the nix build daemon keep the build log?

Tags:

nix

nixos

Sometime when running nix-build and nixos-rebuild I found easy-to-fix problems (like deprecated warnings or redundant imports) and I thought "Interesting, I might be able to fix that in my free time".

I know I could redirect the build log to a file but I keep forgetting to do it until I see the warning again.

Question: Does the nix build daemon save the build log somewhere?

like image 570
wizzup Avatar asked Oct 27 '25 01:10

wizzup


1 Answers

You can enable build-cache-failures in your nix.conf and then use a combination of

nix-store --query-failed-paths

and

nix-store --read-log

If the build failure cache was not already enabled, there is probably no (easy) way to recall which builds have failed, unless you have something to grep -R for in /nix/var/log/nix/drvs/.

like image 194
Robert Hensing Avatar answered Oct 29 '25 20:10

Robert Hensing