mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Make more URLs parsed, most notably FileTransferRequest::url
Trying to gradually replace the use of strings with better types in ways that makes sense.
This commit is contained in:
parent
72a548ed6a
commit
3e86d75c9d
12 changed files with 35 additions and 32 deletions
|
|
@ -37,7 +37,7 @@ static void builtinFetchurl(const BuiltinBuilderContext & ctx)
|
|||
|
||||
auto fetch = [&](const std::string & url) {
|
||||
auto source = sinkToSource([&](Sink & sink) {
|
||||
FileTransferRequest request(url);
|
||||
FileTransferRequest request(parseURL(url));
|
||||
request.decompress = false;
|
||||
|
||||
auto decompressor = makeDecompressionSink(unpack && hasSuffix(mainUrl, ".xz") ? "xz" : "none", sink);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue