nix-log-check checks the closure of a derivation in a binary cache for possibly failing build logs.
This lets you may be able to find out about failing derivations in your system update before your laptop fans spin up to maximum.
Usage
Check the closure of a package to see why it needs building:
$ nix-log-check nixpkgs#wireshark
Check your NixOS configuration:
$ nix-log-check ".#nixosConfigurations.$(hostname).config.system.build.toplevel"
For more options:
$ nix-log-check --help
Example output
$ nix-log-check nixpkgs#python313Packages.pygame-gui
[INFO] nix-log-check/0.1.0
[INFO] Checking 1 root derivation(s), total closure size 2501
[INFO] Possibly failing: lxx0bnmbrz28p34fa34jgliz3sqpnszb-python3.13-pygame-ce-2.5.6.drv
[INFO] 2 path(s) not in binary cache
[INFO] 1 path(s) possibly failing
[
"lxx0bnmbrz28p34fa34jgliz3sqpnszb-python3.13-pygame-ce-2.5.6.drv"
]
How does it work
nix-log-check checks a binary cache for derivations with a build log but without the outputs available.
It assumes that these are caused by the builds failing.
nix-log-check may miss some build failures if the build log was not submitted or has been garbage collected.
It may also produce false positives if the log was still available but the output was garbage collected.
However, it should work well for the common case, namely checking for build failures for a new update.