about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-11-24T17·08+0100
committerEelco Dolstra <edolstra@gmail.com>2017-11-24T17·08+0100
commit549c3706a5d63e10d908b43da8479331a844018f (patch)
treea4c36c62672b28b82faf997f8ada7f2c21ede40f /src/libstore
parent90948a4e3a64492b7d117d93657221fa7b598e6e (diff)
nix path-info: Show URL of NARs in binary caches
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/store-api.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 8146513a4b6e..77ab87ef728e 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -516,6 +516,8 @@ void Store::pathInfoToJSON(JSONPlaceholder & jsonOut, const PathSet & storePaths
                     std::shared_ptr<const ValidPathInfo>(info));
 
                 if (narInfo) {
+                    if (!narInfo->url.empty())
+                        jsonPath.attr("url", narInfo->url);
                     if (narInfo->fileHash)
                         jsonPath.attr("downloadHash", narInfo->fileHash.to_string());
                     if (narInfo->fileSize)