mirror of
https://github.com/NixOS/nix
synced 2025-07-03 06:11:46 +02:00
Move isUri() and resolveUri() out of filetransfer.cc
These are purely related to NIX_PATH / -I command line parsing, so put them in libexpr.
This commit is contained in:
parent
85c1959240
commit
432a3a18d2
7 changed files with 27 additions and 31 deletions
|
@ -93,9 +93,9 @@ Bindings * MixEvalArgs::getAutoArgs(EvalState & state)
|
|||
|
||||
SourcePath lookupFileArg(EvalState & state, std::string_view s)
|
||||
{
|
||||
if (isUri(s)) {
|
||||
if (EvalSettings::isPseudoUrl(s)) {
|
||||
auto storePath = fetchers::downloadTarball(
|
||||
state.store, resolveUri(s), "source", false).first;
|
||||
state.store, EvalSettings::resolvePseudoUrl(s), "source", false).first;
|
||||
auto accessor = makeStorePathAccessor(state.store, storePath);
|
||||
state.registerAccessor(accessor);
|
||||
return {accessor, CanonPath::root};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue