I have a flake that depends on a information in a zip file provided by a third party. This zip file includes all of its contents at the top level, instead of within sub-directories.
This causes a problem with
fetchZip, since they expect all files to be contained within a single subfolder of the root. Now, with
fetchZip, I can pass the
stripRoot = false option and everything is fine. That’s how I’m currently handling the issue.
However, multiple users of my flakes have asked that the file be made an explicit input of the flake. The third party moves the zip file from time to time, requiring me to update the flake file. If it was just one of the inputs, they could override it in their own flake and not wait on my slowness.
Unfortunately, zip flake inputs are automatically downloaded with
fetchTarball and there doesn’t seem to be a way to override strip root. I’ve already tried
inputs.source.url = "https://example.com/file.zip"; inputs.source.flake = false;
But this immediately fails with the message
https://example.com/file.zipcontains an unexpected number of top-level files
Is there any way to prevent nix from trying to strip off the root directory? Alternately, can I tell it to treat the input as just a binary blob? That would at least allow my to manually extract the download myself.