The patch can only restrict downloads of *.narinfo but not of nar/*.nar.xz. Their path contains only a hash without the derivation name. We would have to scan all .narinfo to get that.
Restricting the .narinfo should be enough to break binary cache functionality for a derivation.
Applied this, the "error 10 while decompressing xz file" bug is still present.
I was not aware that Perl will automatically mangle newlines in files. I hope to have solved the corruption issue by adding :raw.
Nope. It's having none of it.
> nix-store -r /nix/store/0n0w7h88j13wdw2mimvghy0062r60ill-sinara-systems-99d3594
these paths will be fetched (0.00 MiB download, 0.12 MiB unpacked):
copying path '/nix/store/0n0w7h88j13wdw2mimvghy0062r60ill-sinara-systems-99d3594' from 'https://nixbld.m-labs.hk'...
error 10 while decompressing xz file
error: build of '/nix/store/0n0w7h88j13wdw2mimvghy0062r60ill-sinara-systems-99d3594' failed
No due date set.
This pull request currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?