aboutsummaryrefslogtreecommitdiff
path: root/src/nix-prefetch-url
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-12-04 00:31:09 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-12-04 00:31:09 +0100
commitc3c23a52ee1c5844343bc5ed075791ec7fec6413 (patch)
treebaf65223d87d2a5a5030f88208ceebab790624da /src/nix-prefetch-url
parente721f99817bb7154d8098c902e25f84521a90b7f (diff)
parentc1d18050b4cfed9eba68d4d21b397c6cce035e37 (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/nix-prefetch-url')
-rw-r--r--src/nix-prefetch-url/nix-prefetch-url.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-prefetch-url/nix-prefetch-url.cc b/src/nix-prefetch-url/nix-prefetch-url.cc
index f54706a8a..78c883833 100644
--- a/src/nix-prefetch-url/nix-prefetch-url.cc
+++ b/src/nix-prefetch-url/nix-prefetch-url.cc
@@ -9,6 +9,7 @@
#include "legacy.hh"
#include "finally.hh"
#include "progress-bar.hh"
+#include "tarfile.hh"
#include <iostream>
@@ -192,8 +193,7 @@ static int _main(int argc, char * * argv)
if (hasSuffix(baseNameOf(uri), ".zip"))
runProgram("unzip", true, {"-qq", tmpFile, "-d", unpacked});
else
- // FIXME: this requires GNU tar for decompression.
- runProgram("tar", true, {"xf", tmpFile, "-C", unpacked});
+ unpackTarfile(tmpFile, unpacked, baseNameOf(uri));
/* If the archive unpacks to a single file/directory, then use
that as the top-level. */