Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Decompress tar files using libarchive #3259
Since #2748, nix is able to decompress tar files without any runtime dependencies. However, this change drops support for
Fortunately, there exist a solution in the form of
This PR changes the
libarchive has the ability to autodetect, compress and decompress lot of compression formats, such as
Ubuntu 16.04, which still seems to be supported by nix, ships with libarchive 3.1.2, from 4 years ago. I've been unable to test compilation with this version.
I have a PoC for decompression and compression support on the source/sinks (for gz,bz2,xz,lzma,zstd). This will drop the direct dependency on liblzma, libbz2 and simplify the code.
But extracting e.g. zip files will require integration between the layers, which is why the decompression and extraction steps are handled at the same time here.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: