cabal2nix icon indicating copy to clipboard operation
cabal2nix copied to clipboard

Fetch remote tarballs/zips using `nix-prefetch-url --unpack`

Open pwm opened this issue 3 years ago • 1 comments

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 as cabal2nix currently downloads them twice, where the first fetch assumes an unpacked url and thus fails.

pwm avatar Nov 08 '22 22:11 pwm

@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).

pwm avatar Nov 10 '22 11:11 pwm