> So I ran > > guix build --log-file > /gnu/store/wk9qbhmdzs62mp40casrndcgm3p50m3b-diamond-0.9.22.drv > > which gave me > > /var/log/guix/drvs/wk/9qbhmdzs62mp40casrndcgm3p50m3b-diamond-0.9.22.drv.bz2 > > which contains the build log for this failed build, including the "foo" > error message.
Another thing we should capture somewhere is that some build systems create full log files. For example cmake creates elaborate output in CMakeFiles/CMakeError.log CMakeFiles/CMakeOutput.log inside the build directory (guix package -i foo -K)