diff options
Diffstat (limited to 'third_party/nix/src/nix-prefetch-url')
-rw-r--r-- | third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc index a83ac62635be..b9de2e826b8e 100644 --- a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc +++ b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc @@ -50,8 +50,7 @@ std::string resolveMirrorUri(EvalState& state, std::string uri) { throw Error(format("mirror URI '%1%' did not expand to anything") % uri); } - std::string mirror = - state.forceString(*mirrorList->second.value->listElems()[0]); + std::string mirror = state.forceString(*(*mirrorList->second.value->list)[0]); return mirror + (absl::EndsWith(mirror, "/") ? "" : "/") + std::string(s, p + 1); } @@ -137,7 +136,7 @@ static int _main(int argc, char** argv) { if (attr->second.value->listSize() < 1) { throw Error("'urls' list is empty"); } - uri = state->forceString(*attr->second.value->listElems()[0]); + uri = state->forceString(*(*attr->second.value->list)[0]); /* Extract the hash mode. */ attr = v.attrs->find(state->symbols.Create("outputHashMode")); |