# use “hello” as a test subject
path=`guix build hello`
hello=$path/bin/hello
hellohash=`guix hash -r $hello`
ls -lh $hello
echo "$hello $hellohash"
# “corrupt” the file
truncate --size=0 $hello
ls -lh $hello
# Now try to repair it
guix gc --verify=repair,contents
# But nothing happens
ls -lh $hello
# Try again
guix build --repair hello
# Again nothing happens
ls -lh $hello
# Fix the problem by removing the broken file from the deduplication
# store.
rm /gnu/store/.links/$hellohash
guix build --repair hello
# And it’s fine again.
ls -lh $hello
