wizzup
wizzup

Reputation: 2411

Does the nix build daemon keep the build log?

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?

Upvotes: 4

Views: 1630

Answers (1)

Robert Hensing
Robert Hensing

Reputation: 7359

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/.

Upvotes: 6

Related Questions