diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-09-11 15:25:43 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-11-26 22:07:28 +0100 |
commit | 8918bae09828133259acb36d6aef60ffbfad252c (patch) | |
tree | 67cb5628c4fc537a4c42ba38a79dbf342215e36c /src/libstore/builtins | |
parent | f2bd8470926686361602e545d63a69d4bfc22f90 (diff) |
Drop remaining uses of external "tar"
Also, fetchGit now runs in O(1) memory since we pipe the output of
'git archive' directly into unpackTarball() (rather than first reading
it all into memory).
Diffstat (limited to 'src/libstore/builtins')
-rw-r--r-- | src/libstore/builtins/unpack-channel.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libstore/builtins/unpack-channel.cc b/src/libstore/builtins/unpack-channel.cc index 5fc68cd66..d18e3ddaf 100644 --- a/src/libstore/builtins/unpack-channel.cc +++ b/src/libstore/builtins/unpack-channel.cc @@ -1,5 +1,4 @@ #include "builtins.hh" -#include "compression.hh" #include "tarfile.hh" namespace nix { @@ -18,16 +17,7 @@ void builtinUnpackChannel(const BasicDerivation & drv) createDirs(out); - auto source = sinkToSource([&](Sink & sink) { - auto decompressor = - hasSuffix(src, ".bz2") ? makeDecompressionSink("bzip2", sink) : - hasSuffix(src, ".xz") ? makeDecompressionSink("xz", sink) : - makeDecompressionSink("none", sink); - readFile(src, *decompressor); - decompressor->finish(); - }); - - unpackTarfile(*source, out); + unpackTarfile(src, out); auto entries = readDirectory(out); if (entries.size() != 1) |