Open pwm opened 2 years ago
@dschrempf thanks for the feedback
I think the fetchPackedUrl function needs a top level comment explaining why it was added.
Agreed, will add.
Aslo, I think the process function should be top-leveled and reused (by fetch and fetchPackedUrl).
I actually did that first but then thought it might be better to try and minimise the change which is why i did it this way. Happy to lift it out (I think it makes sense) but that will mean a slightly bigger PR (not sure if that's an issue though).
Fetching remote tarballs/zips is common enough of a use-case that warrants treating them specially by bypassing other fetching options and going for
nix-prefetch-url --unpack
directly. This speeds up large tarballs ascabal2nix
currently downloads them twice, where the first fetch assumes an unpacked url and thus fails.