about summary refs log tree commit diff
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-03-03T21·12-0500
committerShea Levy <shea@shealevy.com>2017-03-03T21·12-0500
commit5789eaa3f45cadec719b4f642de2169b8b0a56c4 (patch)
treec46c122af0ff474267882643ddcf6c1ea3bf6ede /src/libstore/download.cc
parentd1158bb8168804b27508972988d4b85ba9d5e49d (diff)
Add aws-region param to S3 store URLs
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 75c00d85d344..11374b1da525 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -5,6 +5,9 @@
 #include "store-api.hh"
 #include "archive.hh"
 #include "s3.hh"
+#ifdef ENABLE_S3
+#include <aws/core/client/ClientConfiguration.h>
+#endif
 
 #include <unistd.h>
 #include <fcntl.h>
@@ -496,7 +499,7 @@ struct CurlDownloader : public Downloader
             // FIXME: do this on a worker thread
             sync2async<DownloadResult>(success, failure, [&]() -> DownloadResult {
 #ifdef ENABLE_S3
-                S3Helper s3Helper;
+                S3Helper s3Helper(Aws::Region::US_EAST_1); // FIXME: make configurable
                 auto slash = request.uri.find('/', 5);
                 if (slash == std::string::npos)
                     throw nix::Error("bad S3 URI ‘%s’", request.uri);