1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-10 12:36:01 +01:00

Merge pull request #11285 from DeterminateSystems/downloadTarball-cacheable

fetchers::downloadTarball(): Return a cacheable accessor
This commit is contained in:
tomberek 2024-08-16 23:05:49 -04:00 committed by GitHub
commit 92df2a7cb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 35 additions and 8 deletions

View file

@ -171,7 +171,9 @@ SourcePath lookupFileArg(EvalState & state, std::string_view s, const Path * bas
{
if (EvalSettings::isPseudoUrl(s)) {
auto accessor = fetchers::downloadTarball(
EvalSettings::resolvePseudoUrl(s)).accessor;
state.store,
state.fetchSettings,
EvalSettings::resolvePseudoUrl(s));
auto storePath = fetchToStore(*state.store, SourcePath(accessor), FetchMode::Copy);
return state.rootPath(CanonPath(state.store->toRealPath(storePath)));
}