Need to debug a #guix PACKAGE definition with errors ? Build it with the --keep-failed flag.

Then, go to /tmp/guix-build-PACKAGE and run a Guix shell container with

$GUIX/pre-inst-en guix shell --no-grafts -CN -D PACKAGE --writable-root # coreutils which
source ./environment-variables
rm /bin/sh
cd PACKAGE

These steps reproduce the exact context where the build error arises, and allows debugging it.

#guixtips

@csantosb Yeah I wish there was an easy way to source ./environment-variables as part of the guix shell invocation.