about summary refs log tree commit diff
path: root/third_party/nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-11-21T17·22+0100
committertazjin <mail@tazj.in>2020-11-21T23·18+0000
commit5a00e58904df83c168f3971984916d479277e409 (patch)
tree183ffc507c3a720c4c97b760dc75fa1d6141060a /third_party/nix
parente9088826109dfcc550f599ccdc7926a0eed1cd50 (diff)
chore(3p): Bump nixpkgs to nixos-unstable from 2020-11-21 r/1894
Included fixes for random breakage:

* 3p/awscli: pick from the stable channel; it is broken on unstable
* 3p/googletest: bumped version & removed patches that nixpkgs applies
* 3p/lisp/cffi: bumped library version for SBCL compat
* 3p/nix: fix libsystemd attribute
* 3p/nix: reformatted (clang-format handling of ternaries changed)
* glittershark/home: Use home-manager from nixkpgs
* glittershark/kernel: bumped linux-ck patch hash
* glittershark/kernel: removed "patch patch"
* multi/whitby: Use home-manager from nixpkgs
* tazjin/frog: drop Sourcetrail (it doesn't build currently)

Note that in addition to these changes, some previous CLs updated the
versions of git and cgit which was necessary for this channel bump,
but which could not be done in the same commit due to the nature of
the subtree merges.

Change-Id: If2563e8a68e2750c4b913a976ff7b93b42e8b7f3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2110
Tested-by: BuildkiteCI
Reviewed-by: multi <depot@in-addr.xyz>
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix')
-rw-r--r--third_party/nix/default.nix2
-rw-r--r--third_party/nix/src/libexpr/primops.cc22
-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
-rw-r--r--third_party/nix/src/nix-env/nix-env.cc11
-rw-r--r--third_party/nix/src/nix/hash.cc18
-rw-r--r--third_party/nix/src/nix/ls.cc5
10 files changed, 51 insertions, 62 deletions
diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix
index a8b44208ba4b..15eb69d184da 100644
--- a/third_party/nix/default.nix
+++ b/third_party/nix/default.nix
@@ -61,7 +61,7 @@ in lib.fix (self: pkgs.llvmPackages.libcxxStdenv.mkDerivation {
     grpc
     libseccomp
     libsodium
-    systemd.lib.dev
+    systemd.dev
     openssl
     protobuf
     sqlite
diff --git a/third_party/nix/src/libexpr/primops.cc b/third_party/nix/src/libexpr/primops.cc
index 761ff954a433..5278734dcb6c 100644
--- a/third_party/nix/src/libexpr/primops.cc
+++ b/third_party/nix/src/libexpr/primops.cc
@@ -964,12 +964,10 @@ static void prim_readDir(EvalState& state, const Pos& pos, Value** args,
     if (ent.type == DT_UNKNOWN) {
       ent.type = getFileType(path + "/" + ent.name);
     }
-    mkStringNoCopy(*ent_val,
-                   ent.type == DT_REG
-                       ? "regular"
-                       : ent.type == DT_DIR
-                             ? "directory"
-                             : ent.type == DT_LNK ? "symlink" : "unknown");
+    mkStringNoCopy(*ent_val, ent.type == DT_REG   ? "regular"
+                             : ent.type == DT_DIR ? "directory"
+                             : ent.type == DT_LNK ? "symlink"
+                                                  : "unknown");
   }
 }
 
@@ -1055,13 +1053,11 @@ static void addPath(EvalState& state, const Pos& pos, const std::string& name,
     state.callFunction(*filterFun, arg1, fun2, noPos);
 
     Value arg2;
-    mkString(arg2, S_ISREG(st.st_mode)
-                       ? "regular"
-                       : S_ISDIR(st.st_mode)
-                             ? "directory"
-                             : S_ISLNK(st.st_mode)
-                                   ? "symlink"
-                                   : "unknown" /* not supported, will fail! */);
+    mkString(arg2, S_ISREG(st.st_mode)   ? "regular"
+                   : S_ISDIR(st.st_mode) ? "directory"
+                   : S_ISLNK(st.st_mode)
+                       ? "symlink"
+                       : "unknown" /* not supported, will fail! */);
 
     Value res;
     state.callFunction(fun2, arg2, res, noPos);
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
diff --git a/third_party/nix/src/nix-env/nix-env.cc b/third_party/nix/src/nix-env/nix-env.cc
index ee36510f02a4..15f12abd97e9 100644
--- a/third_party/nix/src/nix-env/nix-env.cc
+++ b/third_party/nix/src/nix-env/nix-env.cc
@@ -260,13 +260,10 @@ static DrvInfos filterBySelector(EvalState& state, const DrvInfos& allElems,
         auto k = newest.find(drvName.name);
 
         if (k != newest.end()) {
-          d = j.first.querySystem() == k->second.first.querySystem()
-                  ? 0
-                  : j.first.querySystem() == settings.thisSystem
-                        ? 1
-                        : k->second.first.querySystem() == settings.thisSystem
-                              ? -1
-                              : 0;
+          d = j.first.querySystem() == k->second.first.querySystem() ? 0
+              : j.first.querySystem() == settings.thisSystem         ? 1
+              : k->second.first.querySystem() == settings.thisSystem ? -1
+                                                                     : 0;
           if (d == 0) {
             d = comparePriorities(state, j.first, k->second.first);
           }
diff --git a/third_party/nix/src/nix/hash.cc b/third_party/nix/src/nix/hash.cc
index 08ada7ccfb3a..a40f7b4c859a 100644
--- a/third_party/nix/src/nix/hash.cc
+++ b/third_party/nix/src/nix/hash.cc
@@ -58,18 +58,18 @@ struct CmdToBase final : Command {
   }
 
   std::string name() override {
-    return base == Base16
-               ? "to-base16"
-               : base == Base32 ? "to-base32"
-                                : base == Base64 ? "to-base64" : "to-sri";
+    return base == Base16   ? "to-base16"
+           : base == Base32 ? "to-base32"
+           : base == Base64 ? "to-base64"
+                            : "to-sri";
   }
 
   std::string description() override {
-    return fmt(
-        "convert a hash to %s representation",
-        base == Base16
-            ? "base-16"
-            : base == Base32 ? "base-32" : base == Base64 ? "base-64" : "SRI");
+    return fmt("convert a hash to %s representation",
+               base == Base16   ? "base-16"
+               : base == Base32 ? "base-32"
+               : base == Base64 ? "base-64"
+                                : "SRI");
   }
 
   void run() override {
diff --git a/third_party/nix/src/nix/ls.cc b/third_party/nix/src/nix/ls.cc
index afa4db92bc61..d6ff1aaf816a 100644
--- a/third_party/nix/src/nix/ls.cc
+++ b/third_party/nix/src/nix/ls.cc
@@ -31,9 +31,8 @@ struct MixLs : virtual Args, MixJSON {
         auto st = accessor->stat(curPath);
         std::string tp = st.type == FSAccessor::Type::tRegular
                              ? (st.isExecutable ? "-r-xr-xr-x" : "-r--r--r--")
-                             : st.type == FSAccessor::Type::tSymlink
-                                   ? "lrwxrwxrwx"
-                                   : "dr-xr-xr-x";
+                         : st.type == FSAccessor::Type::tSymlink ? "lrwxrwxrwx"
+                                                                 : "dr-xr-xr-x";
         std::cout << (format("%s %20d %s") % tp % st.fileSize % relPath);
         if (st.type == FSAccessor::Type::tSymlink) {
           std::cout << " -> " << accessor->readLink(curPath);