Add support for .tar.gz and .tar.bz2 dependencies

Hi!,

 I would find the support for .tar.gz and .tar.bz2 files very useful for my project. It just download and decompress the sources from the provided URL.
What would you think about matching explicitly on the `TarFormat` in there in 3 different clauses, and then just delegating the fetching of a tar source to a secondary function?

This would be more in line with the existing code where everything is made explicit in the pattern match directly.

 It's a minor stylistic difference, so feel free to ignore it.