about summary refs log tree commit diff
path: root/third_party/nix/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore')
-rw-r--r--third_party/nix/src/libstore/binary-cache-store.cc8
-rw-r--r--third_party/nix/src/libstore/build.cc17
-rw-r--r--third_party/nix/src/libstore/download.cc22
-rw-r--r--third_party/nix/src/libstore/local-fs-store.cc6
-rw-r--r--third_party/nix/src/libstore/worker-protocol.hh2
5 files changed, 26 insertions, 29 deletions
diff --git a/third_party/nix/src/libstore/binary-cache-store.cc b/third_party/nix/src/libstore/binary-cache-store.cc
index e5b7ef2cdc3e..0b04e972da7c 100644
--- a/third_party/nix/src/libstore/binary-cache-store.cc
+++ b/third_party/nix/src/libstore/binary-cache-store.cc
@@ -214,10 +214,10 @@ void BinaryCacheStore::addToStore(const ValidPathInfo& info,
 
   /* Atomically write the NAR file. */
   narInfo->url = "nar/" + narInfo->fileHash.to_string(Base32, false) + ".nar" +
-                 (compression == "xz" ? ".xz"
-                                      : compression == "bzip2"
-                                            ? ".bz2"
-                                            : compression == "br" ? ".br" : "");
+                 (compression == "xz"      ? ".xz"
+                  : compression == "bzip2" ? ".bz2"
+                  : compression == "br"    ? ".br"
+                                           : "");
   if ((repair != 0u) || !fileExists(narInfo->url)) {
     stats.narWrite++;
     upsertFile(narInfo->url, *narCompressed, "application/x-nix-nar");
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc
index e50f4cfa9901..2479b9a59c6c 100644
--- a/third_party/nix/src/libstore/build.cc
+++ b/third_party/nix/src/libstore/build.cc
@@ -1462,12 +1462,10 @@ void DerivationGoal::tryToBuild() {
   bool buildLocally = buildMode != bmNormal || parsedDrv->willBuildLocally();
 
   auto started = [&]() {
-    auto msg = fmt(buildMode == bmRepair
-                       ? "repairing outputs of '%s'"
-                       : buildMode == bmCheck
-                             ? "checking outputs of '%s'"
-                             : nrRounds > 1 ? "building '%s' (round %d/%d)"
-                                            : "building '%s'",
+    auto msg = fmt(buildMode == bmRepair  ? "repairing outputs of '%s'"
+                   : buildMode == bmCheck ? "checking outputs of '%s'"
+                   : nrRounds > 1         ? "building '%s' (round %d/%d)"
+                                          : "building '%s'",
                    drvPath, curRound, nrRounds);
 
     if (hook) {
@@ -1748,10 +1746,9 @@ void DerivationGoal::buildDone() {
     else {
       st = dynamic_cast<NotDeterministic*>(&e) != nullptr
                ? BuildResult::NotDeterministic
-               : statusOk(status)
-                     ? BuildResult::OutputRejected
-                     : fixedOutput || diskFull ? BuildResult::TransientFailure
-                                               : BuildResult::PermanentFailure;
+           : statusOk(status)        ? BuildResult::OutputRejected
+           : fixedOutput || diskFull ? BuildResult::TransientFailure
+                                     : BuildResult::PermanentFailure;
     }
 
     done(st, e.msg());
diff --git a/third_party/nix/src/libstore/download.cc b/third_party/nix/src/libstore/download.cc
index ee2ce8152dbc..a2eed7ced8e3 100644
--- a/third_party/nix/src/libstore/download.cc
+++ b/third_party/nix/src/libstore/download.cc
@@ -435,17 +435,17 @@ struct CurlDownloader : public Downloader {
             code == CURLE_ABORTED_BY_CALLBACK && _isInterrupted
                 ? DownloadError(Interrupted, fmt("%s of '%s' was interrupted",
                                                  request.verb(), request.uri))
-                : httpStatus != 0
-                      ? DownloadError(
-                            err, fmt("unable to %s '%s': HTTP error %d",
-                                     request.verb(), request.uri, httpStatus) +
-                                     (code == CURLE_OK
-                                          ? ""
-                                          : fmt(" (curl error: %s)",
-                                                curl_easy_strerror(code))))
-                      : DownloadError(err, fmt("unable to %s '%s': %s (%d)",
-                                               request.verb(), request.uri,
-                                               curl_easy_strerror(code), code));
+            : httpStatus != 0
+                ? DownloadError(
+                      err,
+                      fmt("unable to %s '%s': HTTP error %d", request.verb(),
+                          request.uri, httpStatus) +
+                          (code == CURLE_OK ? ""
+                                            : fmt(" (curl error: %s)",
+                                                  curl_easy_strerror(code))))
+                : DownloadError(
+                      err, fmt("unable to %s '%s': %s (%d)", request.verb(),
+                               request.uri, curl_easy_strerror(code), code));
 
         /* If this is a transient error, then maybe retry the
            download after a while. If we're writing to a
diff --git a/third_party/nix/src/libstore/local-fs-store.cc b/third_party/nix/src/libstore/local-fs-store.cc
index 2ebf99a9b5a2..f2235bad7677 100644
--- a/third_party/nix/src/libstore/local-fs-store.cc
+++ b/third_party/nix/src/libstore/local-fs-store.cc
@@ -38,9 +38,9 @@ struct LocalStoreAccessor : public FSAccessor {
       throw Error(format("file '%1%' has unsupported type") % path);
     }
 
-    return {S_ISREG(st.st_mode)
-                ? Type::tRegular
-                : S_ISLNK(st.st_mode) ? Type::tSymlink : Type::tDirectory,
+    return {S_ISREG(st.st_mode)   ? Type::tRegular
+            : S_ISLNK(st.st_mode) ? Type::tSymlink
+                                  : Type::tDirectory,
             S_ISREG(st.st_mode) ? static_cast<uint64_t>(st.st_size) : 0,
             S_ISREG(st.st_mode) && ((st.st_mode & S_IXUSR) != 0u)};
   }
diff --git a/third_party/nix/src/libstore/worker-protocol.hh b/third_party/nix/src/libstore/worker-protocol.hh
index e2f40a449d86..47095253a129 100644
--- a/third_party/nix/src/libstore/worker-protocol.hh
+++ b/third_party/nix/src/libstore/worker-protocol.hh
@@ -53,7 +53,7 @@ typedef enum {
 } WorkerOp;
 
 #define STDERR_NEXT 0x6f6c6d67
-#define STDERR_READ 0x64617461   // data needed from source
+#define STDERR_READ 0x64617461  // data needed from source
 #define STDERR_WRITE 0x64617416  // data for sink
 #define STDERR_LAST 0x616c7473
 #define STDERR_ERROR 0x63787470