I need to pull images from a registry which requires a login so I ran skopeo login which created ~/.docker/config.json. nix-prefetch-docker ignores that file and I get an authentication error. I have to run skopeo copy then nix-store --add-fixed to pull the images.
So the workaround that I now use is to basically “unwrap” the script in order to skip the resetting of the HOME variable and call .nix-prefetch-docker-wrapped directrly.
Somehow prefetching no longer works. Even after the image is downloaded the subsequent nix-build which needs it tries to download it again and fails due to the missing credentials.