From 5a00e58904df83c168f3971984916d479277e409 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 21 Nov 2020 18:22:54 +0100 Subject: chore(3p): Bump nixpkgs to nixos-unstable from 2020-11-21 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 Reviewed-by: glittershark --- third_party/default.nix | 15 ++++++++++----- third_party/gtest/default.nix | 5 +++-- third_party/lisp/cffi.nix | 2 +- third_party/nix/default.nix | 2 +- third_party/nix/src/libexpr/primops.cc | 22 +++++++++------------- third_party/nix/src/libstore/binary-cache-store.cc | 8 ++++---- third_party/nix/src/libstore/build.cc | 17 +++++++---------- third_party/nix/src/libstore/download.cc | 22 +++++++++++----------- third_party/nix/src/libstore/local-fs-store.cc | 6 +++--- third_party/nix/src/libstore/worker-protocol.hh | 2 +- third_party/nix/src/nix-env/nix-env.cc | 11 ++++------- third_party/nix/src/nix/hash.cc | 18 +++++++++--------- third_party/nix/src/nix/ls.cc | 5 ++--- 13 files changed, 65 insertions(+), 70 deletions(-) (limited to 'third_party') diff --git a/third_party/default.nix b/third_party/default.nix index f8881fac81..b795f5c24b 100644 --- a/third_party/default.nix +++ b/third_party/default.nix @@ -5,11 +5,11 @@ { ... }: let - # Tracking nixos-unstable as of 2020-08-16. - nixpkgsCommit = "16fc531784ac226fb268cc59ad573d2746c109c1"; + # Tracking nixos-unstable as of 2020-11-21. + nixpkgsCommit = "a322b32e9d74fb476944ff6cfb55833dc69cfaaa"; nixpkgsSrc = fetchTarball { - url = "https://github.com/NixOS/nixpkgs-channels/archive/${nixpkgsCommit}.tar.gz"; - sha256 = "0qw1jpdfih9y0dycslapzfp8bl4z7vfg9c7qz176wghwybm4sx0a"; + url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsCommit}.tar.gz"; + sha256 = "1r0mkiqxija75spnyksmh8x5j4smnrxv5f7768s81gsl570kls0l"; }; nixpkgs = import nixpkgsSrc { config.allowUnfree = true; @@ -38,7 +38,6 @@ let autoreconfHook avrdude avrlibc - awscli bashInteractive bat buildBazelPackage @@ -159,6 +158,12 @@ let zlib zstd; + # Inherit packages from the stable channel for things that are + # broken on unstable + inherit (stableNixpkgs) + awscli # TODO(grfn): Move back to unstable once it is fixed + ; + # Required by //third_party/nix inherit (nixpkgs) aws-sdk-cpp diff --git a/third_party/gtest/default.nix b/third_party/gtest/default.nix index 6c2215fb7a..5ca8080b52 100644 --- a/third_party/gtest/default.nix +++ b/third_party/gtest/default.nix @@ -6,7 +6,8 @@ src = pkgs.fetchFromGitHub { owner = "google"; repo = "googletest"; - rev = "a781fe29bcf73003559a3583167fe3d647518464"; - sha256 = "0zny8kgbkslazzsnskygj3pkcj7l13xhgcwjyxswxymxq8m41kgy"; + rev = "9dce5e5d878176dc0054ef381f5c6e705f43ef99"; + sha256 = "05xi61j7j251dzkgk9965lqpbacsy44iblzql941kw9d4nk0q6jl"; }; + patches = []; }) diff --git a/third_party/lisp/cffi.nix b/third_party/lisp/cffi.nix index 62c1f81da7..9a50e57e05 100644 --- a/third_party/lisp/cffi.nix +++ b/third_party/lisp/cffi.nix @@ -4,7 +4,7 @@ with depot.nix; let src = builtins.fetchGit { url = "https://github.com/cffi/cffi.git"; - rev = "5e838bf46d0089c43ebd3ea014a207c403e29c61"; + rev = "a49ff36a95cb62ffa6cb069d98378d665769926b"; }; in buildLisp.library { name = "cffi"; diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix index a8b44208ba..15eb69d184 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 761ff954a4..5278734dcb 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 e5b7ef2cdc..0b04e972da 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 e50f4cfa99..2479b9a59c 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(&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 ee2ce8152d..a2eed7ced8 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 2ebf99a9b5..f2235bad76 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(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 e2f40a449d..47095253a1 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 ee36510f02..15f12abd97 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 08ada7ccfb..a40f7b4c85 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 afa4db92bc..d6ff1aaf81 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); -- cgit 1.4.1