about summary refs log tree commit diff
path: root/third_party/nix/src/nix-prefetch-url
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-prefetch-url')
-rw-r--r--third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc16
1 files changed, 8 insertions, 8 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 17341e382d1a..fa88dc9bc67e 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
@@ -43,13 +43,13 @@ string resolveMirrorUri(EvalState& state, string uri) {
   if (mirrorList == vMirrors.attrs->end()) {
     throw Error(format("unknown mirror name '%1%'") % mirrorName);
   }
-  state.forceList(*mirrorList->value);
+  state.forceList(*mirrorList->second.value);
 
-  if (mirrorList->value->listSize() < 1) {
+  if (mirrorList->second.value->listSize() < 1) {
     throw Error(format("mirror URI '%1%' did not expand to anything") % uri);
   }
 
-  string mirror = state.forceString(*mirrorList->value->listElems()[0]);
+  string mirror = state.forceString(*mirrorList->second.value->listElems()[0]);
   return mirror + (hasSuffix(mirror, "/") ? "" : "/") + string(s, p + 1);
 }
 
@@ -130,25 +130,25 @@ static int _main(int argc, char** argv) {
       if (attr == v.attrs->end()) {
         throw Error("attribute set does not contain a 'urls' attribute");
       }
-      state->forceList(*attr->value);
-      if (attr->value->listSize() < 1) {
+      state->forceList(*attr->second.value);
+      if (attr->second.value->listSize() < 1) {
         throw Error("'urls' list is empty");
       }
-      uri = state->forceString(*attr->value->listElems()[0]);
+      uri = state->forceString(*attr->second.value->listElems()[0]);
 
       /* Extract the hash mode. */
       attr = v.attrs->find(state->symbols.Create("outputHashMode"));
       if (attr == v.attrs->end()) {
         LOG(WARNING) << "this does not look like a fetchurl call";
       } else {
-        unpack = state->forceString(*attr->value) == "recursive";
+        unpack = state->forceString(*attr->second.value) == "recursive";
       }
 
       /* Extract the name. */
       if (name.empty()) {
         attr = v.attrs->find(state->symbols.Create("name"));
         if (attr != v.attrs->end()) {
-          name = state->forceString(*attr->value);
+          name = state->forceString(*attr->second.value);
         }
       }
     }