1
1
Fork 0
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:
John Ericson 2025-08-20 22:41:46 -04:00
parent 72a548ed6a
commit 3e86d75c9d
12 changed files with 35 additions and 32 deletions

View file

@ -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);