about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-19T14·54+0100
committerVincent Ambo <tazjin@google.com>2020-05-19T14·55+0100
commitc758de9d22506eb279c5abe61f621e5c8f61af95 (patch)
tree3b1703133f56f7e301f538014dc7e41713a2e980
parentb508f5b91a1b0c7009dcafb23114fff8d6020765 (diff)
style(3p/nix): Reformat all includes to match new style r/766
-rw-r--r--third_party/nix/src/build-remote/build-remote.cc3
-rw-r--r--third_party/nix/src/libexpr/attr-path.cc1
-rw-r--r--third_party/nix/src/libexpr/attr-path.hh1
-rw-r--r--third_party/nix/src/libexpr/attr-set.cc2
-rw-r--r--third_party/nix/src/libexpr/attr-set.hh1
-rw-r--r--third_party/nix/src/libexpr/common-eval-args.cc1
-rw-r--r--third_party/nix/src/libexpr/eval.cc11
-rw-r--r--third_party/nix/src/libexpr/eval.hh1
-rw-r--r--third_party/nix/src/libexpr/function-trace.cc1
-rw-r--r--third_party/nix/src/libexpr/function-trace.hh1
-rw-r--r--third_party/nix/src/libexpr/get-drvs.cc5
-rw-r--r--third_party/nix/src/libexpr/get-drvs.hh1
-rw-r--r--third_party/nix/src/libexpr/json-to-value.cc1
-rw-r--r--third_party/nix/src/libexpr/json-to-value.hh1
-rw-r--r--third_party/nix/src/libexpr/names.cc1
-rw-r--r--third_party/nix/src/libexpr/names.hh1
-rw-r--r--third_party/nix/src/libexpr/nixexpr.cc2
-rw-r--r--third_party/nix/src/libexpr/nixexpr.hh1
-rw-r--r--third_party/nix/src/libexpr/primops.cc9
-rw-r--r--third_party/nix/src/libexpr/primops.hh1
-rw-r--r--third_party/nix/src/libexpr/primops/fetchGit.cc6
-rw-r--r--third_party/nix/src/libexpr/primops/fetchMercurial.cc6
-rw-r--r--third_party/nix/src/libexpr/symbol-table.hh1
-rw-r--r--third_party/nix/src/libexpr/value-to-json.cc2
-rw-r--r--third_party/nix/src/libexpr/value-to-json.hh1
-rw-r--r--third_party/nix/src/libexpr/value-to-xml.cc2
-rw-r--r--third_party/nix/src/libexpr/value-to-xml.hh1
-rw-r--r--third_party/nix/src/libmain/common-args.cc2
-rw-r--r--third_party/nix/src/libmain/shared.cc15
-rw-r--r--third_party/nix/src/libmain/shared.hh4
-rw-r--r--third_party/nix/src/libmain/stack.cc6
-rw-r--r--third_party/nix/src/libstore/binary-cache-store.cc2
-rw-r--r--third_party/nix/src/libstore/binary-cache-store.hh1
-rw-r--r--third_party/nix/src/libstore/build.cc22
-rw-r--r--third_party/nix/src/libstore/builtins/buildenv.cc4
-rw-r--r--third_party/nix/src/libstore/builtins/fetchurl.cc1
-rw-r--r--third_party/nix/src/libstore/crypto.cc1
-rw-r--r--third_party/nix/src/libstore/crypto.hh1
-rw-r--r--third_party/nix/src/libstore/derivations.cc1
-rw-r--r--third_party/nix/src/libstore/derivations.hh1
-rw-r--r--third_party/nix/src/libstore/download.cc10
-rw-r--r--third_party/nix/src/libstore/download.hh1
-rw-r--r--third_party/nix/src/libstore/export-import.cc1
-rw-r--r--third_party/nix/src/libstore/gc.cc14
-rw-r--r--third_party/nix/src/libstore/globals.cc5
-rw-r--r--third_party/nix/src/libstore/globals.hh4
-rw-r--r--third_party/nix/src/libstore/http-binary-cache-store.cc1
-rw-r--r--third_party/nix/src/libstore/local-store.cc9
-rw-r--r--third_party/nix/src/libstore/local-store.hh1
-rw-r--r--third_party/nix/src/libstore/machines.cc5
-rw-r--r--third_party/nix/src/libstore/misc.cc1
-rw-r--r--third_party/nix/src/libstore/nar-accessor.cc2
-rw-r--r--third_party/nix/src/libstore/nar-accessor.hh1
-rw-r--r--third_party/nix/src/libstore/nar-info-disk-cache.cc2
-rw-r--r--third_party/nix/src/libstore/nar-info.cc1
-rw-r--r--third_party/nix/src/libstore/optimise-store.cc8
-rw-r--r--third_party/nix/src/libstore/parsed-derivations.hh1
-rw-r--r--third_party/nix/src/libstore/pathlocks.cc7
-rw-r--r--third_party/nix/src/libstore/profiles.cc2
-rw-r--r--third_party/nix/src/libstore/profiles.hh1
-rw-r--r--third_party/nix/src/libstore/references.cc5
-rw-r--r--third_party/nix/src/libstore/remote-fs-accessor.cc2
-rw-r--r--third_party/nix/src/libstore/remote-store.cc5
-rw-r--r--third_party/nix/src/libstore/remote-store.hh1
-rw-r--r--third_party/nix/src/libstore/s3-binary-cache-store.cc2
-rw-r--r--third_party/nix/src/libstore/s3-binary-cache-store.hh1
-rw-r--r--third_party/nix/src/libstore/sqlite.cc5
-rw-r--r--third_party/nix/src/libstore/sqlite.hh1
-rw-r--r--third_party/nix/src/libstore/store-api.cc5
-rw-r--r--third_party/nix/src/libstore/store-api.hh1
-rw-r--r--third_party/nix/src/libutil/affinity.cc2
-rw-r--r--third_party/nix/src/libutil/archive.cc11
-rw-r--r--third_party/nix/src/libutil/args.cc1
-rw-r--r--third_party/nix/src/libutil/args.hh1
-rw-r--r--third_party/nix/src/libutil/compression.cc9
-rw-r--r--third_party/nix/src/libutil/compression.hh1
-rw-r--r--third_party/nix/src/libutil/config.cc2
-rw-r--r--third_party/nix/src/libutil/config.hh1
-rw-r--r--third_party/nix/src/libutil/hash.cc7
-rw-r--r--third_party/nix/src/libutil/json.cc1
-rw-r--r--third_party/nix/src/libutil/monitor-fd.hh7
-rw-r--r--third_party/nix/src/libutil/pool.hh1
-rw-r--r--third_party/nix/src/libutil/serialise.cc2
-rw-r--r--third_party/nix/src/libutil/serialise.hh1
-rw-r--r--third_party/nix/src/libutil/thread-pool.cc1
-rw-r--r--third_party/nix/src/libutil/thread-pool.hh1
-rw-r--r--third_party/nix/src/libutil/types.hh1
-rw-r--r--third_party/nix/src/libutil/util.cc19
-rw-r--r--third_party/nix/src/libutil/util.hh12
-rw-r--r--third_party/nix/src/libutil/xml-writer.cc1
-rw-r--r--third_party/nix/src/nix-build/nix-build.cc4
-rw-r--r--third_party/nix/src/nix-channel/nix-channel.cc4
-rw-r--r--third_party/nix/src/nix-collect-garbage/nix-collect-garbage.cc4
-rw-r--r--third_party/nix/src/nix-copy-closure/nix-copy-closure.cc1
-rw-r--r--third_party/nix/src/nix-daemon/nix-daemon.cc6
-rw-r--r--third_party/nix/src/nix-env/nix-env.cc10
-rw-r--r--third_party/nix/src/nix-env/user-env.cc2
-rw-r--r--third_party/nix/src/nix-instantiate/nix-instantiate.cc1
-rw-r--r--third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc4
-rw-r--r--third_party/nix/src/nix-store/dotgraph.cc2
-rw-r--r--third_party/nix/src/nix-store/graphml.cc2
-rw-r--r--third_party/nix/src/nix-store/nix-store.cc8
-rw-r--r--third_party/nix/src/nix/command.cc1
-rw-r--r--third_party/nix/src/nix/copy.cc1
-rw-r--r--third_party/nix/src/nix/edit.cc1
-rw-r--r--third_party/nix/src/nix/eval.cc1
-rw-r--r--third_party/nix/src/nix/hash.cc1
-rw-r--r--third_party/nix/src/nix/installables.cc1
-rw-r--r--third_party/nix/src/nix/log.cc1
-rw-r--r--third_party/nix/src/nix/main.cc4
-rw-r--r--third_party/nix/src/nix/optimise-store.cc1
-rw-r--r--third_party/nix/src/nix/path-info.cc1
-rw-r--r--third_party/nix/src/nix/repl.cc5
-rw-r--r--third_party/nix/src/nix/search.cc4
-rw-r--r--third_party/nix/src/nix/sigs.cc4
-rw-r--r--third_party/nix/src/nix/upgrade-nix.cc1
-rw-r--r--third_party/nix/src/nix/verify.cc4
-rw-r--r--third_party/nix/src/nix/why-depends.cc4
-rw-r--r--third_party/nix/src/resolve-system-dependencies/resolve-system-dependencies.cc8
119 files changed, 298 insertions, 106 deletions
diff --git a/third_party/nix/src/build-remote/build-remote.cc b/third_party/nix/src/build-remote/build-remote.cc
index b1558447d66e..cba4e969a767 100644
--- a/third_party/nix/src/build-remote/build-remote.cc
+++ b/third_party/nix/src/build-remote/build-remote.cc
@@ -1,4 +1,3 @@
-#include <glog/logging.h>
 #include <algorithm>
 #include <cstdlib>
 #include <cstring>
@@ -6,6 +5,8 @@
 #include <memory>
 #include <set>
 #include <tuple>
+
+#include <glog/logging.h>
 #if __APPLE__
 #include <sys/time.h>
 #endif
diff --git a/third_party/nix/src/libexpr/attr-path.cc b/third_party/nix/src/libexpr/attr-path.cc
index 4eb44ec3357d..584f49d124ef 100644
--- a/third_party/nix/src/libexpr/attr-path.cc
+++ b/third_party/nix/src/libexpr/attr-path.cc
@@ -1,4 +1,5 @@
 #include "attr-path.hh"
+
 #include "eval-inline.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libexpr/attr-path.hh b/third_party/nix/src/libexpr/attr-path.hh
index 9c38cdde049f..6b22df622486 100644
--- a/third_party/nix/src/libexpr/attr-path.hh
+++ b/third_party/nix/src/libexpr/attr-path.hh
@@ -2,6 +2,7 @@
 
 #include <map>
 #include <string>
+
 #include "eval.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/attr-set.cc b/third_party/nix/src/libexpr/attr-set.cc
index cdca3953e653..d5bedbae434e 100644
--- a/third_party/nix/src/libexpr/attr-set.cc
+++ b/third_party/nix/src/libexpr/attr-set.cc
@@ -1,5 +1,7 @@
 #include "attr-set.hh"
+
 #include <algorithm>
+
 #include "eval-inline.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/attr-set.hh b/third_party/nix/src/libexpr/attr-set.hh
index f56261ad6a5a..e5a888d7e981 100644
--- a/third_party/nix/src/libexpr/attr-set.hh
+++ b/third_party/nix/src/libexpr/attr-set.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <algorithm>
+
 #include "nixexpr.hh"
 #include "symbol-table.hh"
 
diff --git a/third_party/nix/src/libexpr/common-eval-args.cc b/third_party/nix/src/libexpr/common-eval-args.cc
index 1e2fe891f544..8cd4bc56e592 100644
--- a/third_party/nix/src/libexpr/common-eval-args.cc
+++ b/third_party/nix/src/libexpr/common-eval-args.cc
@@ -1,4 +1,5 @@
 #include "common-eval-args.hh"
+
 #include "download.hh"
 #include "eval.hh"
 #include "shared.hh"
diff --git a/third_party/nix/src/libexpr/eval.cc b/third_party/nix/src/libexpr/eval.cc
index f33735cc585d..2a9e18db2802 100644
--- a/third_party/nix/src/libexpr/eval.cc
+++ b/third_party/nix/src/libexpr/eval.cc
@@ -1,13 +1,16 @@
 #include "eval.hh"
-#include <glog/logging.h>
-#include <sys/resource.h>
-#include <sys/time.h>
-#include <unistd.h>
+
 #include <algorithm>
 #include <chrono>
 #include <cstring>
 #include <fstream>
 #include <iostream>
+
+#include <glog/logging.h>
+#include <sys/resource.h>
+#include <sys/time.h>
+#include <unistd.h>
+
 #include "derivations.hh"
 #include "download.hh"
 #include "eval-inline.hh"
diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh
index 74777e48fa95..b50142926bff 100644
--- a/third_party/nix/src/libexpr/eval.hh
+++ b/third_party/nix/src/libexpr/eval.hh
@@ -3,6 +3,7 @@
 #include <map>
 #include <optional>
 #include <unordered_map>
+
 #include "attr-set.hh"
 #include "config.hh"
 #include "hash.hh"
diff --git a/third_party/nix/src/libexpr/function-trace.cc b/third_party/nix/src/libexpr/function-trace.cc
index 4f164e6c4498..8b0d60fab8be 100644
--- a/third_party/nix/src/libexpr/function-trace.cc
+++ b/third_party/nix/src/libexpr/function-trace.cc
@@ -1,4 +1,5 @@
 #include "function-trace.hh"
+
 #include <glog/logging.h>
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/function-trace.hh b/third_party/nix/src/libexpr/function-trace.hh
index bd27b8aebc7c..93d70862eda1 100644
--- a/third_party/nix/src/libexpr/function-trace.hh
+++ b/third_party/nix/src/libexpr/function-trace.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <chrono>
+
 #include "eval.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/get-drvs.cc b/third_party/nix/src/libexpr/get-drvs.cc
index fdf3494ed26a..77b6ee2014e9 100644
--- a/third_party/nix/src/libexpr/get-drvs.cc
+++ b/third_party/nix/src/libexpr/get-drvs.cc
@@ -1,7 +1,10 @@
 #include "get-drvs.hh"
-#include <glog/logging.h>
+
 #include <cstring>
 #include <regex>
+
+#include <glog/logging.h>
+
 #include "derivations.hh"
 #include "eval-inline.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libexpr/get-drvs.hh b/third_party/nix/src/libexpr/get-drvs.hh
index 0dca12cafc4e..deb0a6d647a9 100644
--- a/third_party/nix/src/libexpr/get-drvs.hh
+++ b/third_party/nix/src/libexpr/get-drvs.hh
@@ -2,6 +2,7 @@
 
 #include <map>
 #include <string>
+
 #include "eval.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/json-to-value.cc b/third_party/nix/src/libexpr/json-to-value.cc
index 8615d9797fa8..a6c12fd8244c 100644
--- a/third_party/nix/src/libexpr/json-to-value.cc
+++ b/third_party/nix/src/libexpr/json-to-value.cc
@@ -1,4 +1,5 @@
 #include "json-to-value.hh"
+
 #include <cstring>
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/json-to-value.hh b/third_party/nix/src/libexpr/json-to-value.hh
index eb555c643fab..5b67b350646e 100644
--- a/third_party/nix/src/libexpr/json-to-value.hh
+++ b/third_party/nix/src/libexpr/json-to-value.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <string>
+
 #include "eval.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/names.cc b/third_party/nix/src/libexpr/names.cc
index c3dd2a9bd1ed..8e198f0925ca 100644
--- a/third_party/nix/src/libexpr/names.cc
+++ b/third_party/nix/src/libexpr/names.cc
@@ -1,4 +1,5 @@
 #include "names.hh"
+
 #include "util.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/names.hh b/third_party/nix/src/libexpr/names.hh
index 219a595d15e2..bd2aa1a11552 100644
--- a/third_party/nix/src/libexpr/names.hh
+++ b/third_party/nix/src/libexpr/names.hh
@@ -2,6 +2,7 @@
 
 #include <memory>
 #include <regex>
+
 #include "types.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/nixexpr.cc b/third_party/nix/src/libexpr/nixexpr.cc
index 4147cbbf532b..8f1dbbb6db05 100644
--- a/third_party/nix/src/libexpr/nixexpr.cc
+++ b/third_party/nix/src/libexpr/nixexpr.cc
@@ -1,5 +1,7 @@
 #include "nixexpr.hh"
+
 #include <cstdlib>
+
 #include "derivations.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libexpr/nixexpr.hh b/third_party/nix/src/libexpr/nixexpr.hh
index efc4398c2371..349e633ede73 100644
--- a/third_party/nix/src/libexpr/nixexpr.hh
+++ b/third_party/nix/src/libexpr/nixexpr.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <map>
+
 #include "symbol-table.hh"
 #include "value.hh"
 
diff --git a/third_party/nix/src/libexpr/primops.cc b/third_party/nix/src/libexpr/primops.cc
index 23eaba57972d..e7778ed32a1c 100644
--- a/third_party/nix/src/libexpr/primops.cc
+++ b/third_party/nix/src/libexpr/primops.cc
@@ -1,12 +1,15 @@
 #include "primops.hh"
+
+#include <algorithm>
+#include <cstring>
+#include <regex>
+
 #include <dlfcn.h>
 #include <glog/logging.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <algorithm>
-#include <cstring>
-#include <regex>
+
 #include "archive.hh"
 #include "derivations.hh"
 #include "download.hh"
diff --git a/third_party/nix/src/libexpr/primops.hh b/third_party/nix/src/libexpr/primops.hh
index 60326323b2e0..8e674509c7c4 100644
--- a/third_party/nix/src/libexpr/primops.hh
+++ b/third_party/nix/src/libexpr/primops.hh
@@ -1,5 +1,6 @@
 #include <tuple>
 #include <vector>
+
 #include "eval.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/primops/fetchGit.cc b/third_party/nix/src/libexpr/primops/fetchGit.cc
index 21994db07616..b707202c9085 100644
--- a/third_party/nix/src/libexpr/primops/fetchGit.cc
+++ b/third_party/nix/src/libexpr/primops/fetchGit.cc
@@ -1,7 +1,9 @@
-#include <glog/logging.h>
-#include <sys/time.h>
 #include <nlohmann/json.hpp>
 #include <regex>
+
+#include <glog/logging.h>
+#include <sys/time.h>
+
 #include "download.hh"
 #include "eval-inline.hh"
 #include "hash.hh"
diff --git a/third_party/nix/src/libexpr/primops/fetchMercurial.cc b/third_party/nix/src/libexpr/primops/fetchMercurial.cc
index 17fdb2b31897..dad2d597ecc7 100644
--- a/third_party/nix/src/libexpr/primops/fetchMercurial.cc
+++ b/third_party/nix/src/libexpr/primops/fetchMercurial.cc
@@ -1,7 +1,9 @@
-#include <glog/logging.h>
-#include <sys/time.h>
 #include <nlohmann/json.hpp>
 #include <regex>
+
+#include <glog/logging.h>
+#include <sys/time.h>
+
 #include "download.hh"
 #include "eval-inline.hh"
 #include "pathlocks.hh"
diff --git a/third_party/nix/src/libexpr/symbol-table.hh b/third_party/nix/src/libexpr/symbol-table.hh
index 932bff5b46fb..61a43ab978f4 100644
--- a/third_party/nix/src/libexpr/symbol-table.hh
+++ b/third_party/nix/src/libexpr/symbol-table.hh
@@ -2,6 +2,7 @@
 
 #include <map>
 #include <unordered_set>
+
 #include "types.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libexpr/value-to-json.cc b/third_party/nix/src/libexpr/value-to-json.cc
index d96575e734dc..e9a39b8aaad6 100644
--- a/third_party/nix/src/libexpr/value-to-json.cc
+++ b/third_party/nix/src/libexpr/value-to-json.cc
@@ -1,6 +1,8 @@
 #include "value-to-json.hh"
+
 #include <cstdlib>
 #include <iomanip>
+
 #include "eval-inline.hh"
 #include "json.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libexpr/value-to-json.hh b/third_party/nix/src/libexpr/value-to-json.hh
index 62708e4751dd..6ec36c829d37 100644
--- a/third_party/nix/src/libexpr/value-to-json.hh
+++ b/third_party/nix/src/libexpr/value-to-json.hh
@@ -2,6 +2,7 @@
 
 #include <map>
 #include <string>
+
 #include "eval.hh"
 #include "nixexpr.hh"
 
diff --git a/third_party/nix/src/libexpr/value-to-xml.cc b/third_party/nix/src/libexpr/value-to-xml.cc
index d9fddaafbbec..80c4adb78ff9 100644
--- a/third_party/nix/src/libexpr/value-to-xml.cc
+++ b/third_party/nix/src/libexpr/value-to-xml.cc
@@ -1,5 +1,7 @@
 #include "value-to-xml.hh"
+
 #include <cstdlib>
+
 #include "eval-inline.hh"
 #include "util.hh"
 #include "xml-writer.hh"
diff --git a/third_party/nix/src/libexpr/value-to-xml.hh b/third_party/nix/src/libexpr/value-to-xml.hh
index e456b4921b24..e7749dd7ae30 100644
--- a/third_party/nix/src/libexpr/value-to-xml.hh
+++ b/third_party/nix/src/libexpr/value-to-xml.hh
@@ -2,6 +2,7 @@
 
 #include <map>
 #include <string>
+
 #include "eval.hh"
 #include "nixexpr.hh"
 
diff --git a/third_party/nix/src/libmain/common-args.cc b/third_party/nix/src/libmain/common-args.cc
index bbd73cc840fa..9863eda63bf1 100644
--- a/third_party/nix/src/libmain/common-args.cc
+++ b/third_party/nix/src/libmain/common-args.cc
@@ -1,5 +1,7 @@
 #include "common-args.hh"
+
 #include <glog/logging.h>
+
 #include "globals.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libmain/shared.cc b/third_party/nix/src/libmain/shared.cc
index fee18c5f1a05..05ae04714fd0 100644
--- a/third_party/nix/src/libmain/shared.cc
+++ b/third_party/nix/src/libmain/shared.cc
@@ -1,16 +1,19 @@
 #include "shared.hh"
-#include <glog/logging.h>
-#include <openssl/crypto.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <unistd.h>
+
 #include <algorithm>
 #include <cctype>
 #include <cstdlib>
 #include <exception>
 #include <iostream>
 #include <mutex>
+
+#include <glog/logging.h>
+#include <openssl/crypto.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <unistd.h>
+
 #include "globals.hh"
 #include "store-api.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libmain/shared.hh b/third_party/nix/src/libmain/shared.hh
index 68d4c49cf6ff..2f9bc1a72ab0 100644
--- a/third_party/nix/src/libmain/shared.hh
+++ b/third_party/nix/src/libmain/shared.hh
@@ -1,7 +1,9 @@
 #pragma once
 
-#include <signal.h>
 #include <locale>
+
+#include <signal.h>
+
 #include "args.hh"
 #include "common-args.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libmain/stack.cc b/third_party/nix/src/libmain/stack.cc
index 621542d2198a..39866bb48248 100644
--- a/third_party/nix/src/libmain/stack.cc
+++ b/third_party/nix/src/libmain/stack.cc
@@ -1,8 +1,10 @@
-#include <signal.h>
-#include <unistd.h>
 #include <cstddef>
 #include <cstdlib>
 #include <cstring>
+
+#include <signal.h>
+#include <unistd.h>
+
 #include "types.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/binary-cache-store.cc b/third_party/nix/src/libstore/binary-cache-store.cc
index a9e7057648aa..a1bcd3c0cf80 100644
--- a/third_party/nix/src/libstore/binary-cache-store.cc
+++ b/third_party/nix/src/libstore/binary-cache-store.cc
@@ -1,6 +1,8 @@
 #include "binary-cache-store.hh"
+
 #include <chrono>
 #include <future>
+
 #include "archive.hh"
 #include "compression.hh"
 #include "derivations.hh"
diff --git a/third_party/nix/src/libstore/binary-cache-store.hh b/third_party/nix/src/libstore/binary-cache-store.hh
index 80121aa22ee8..cd88ccdd8433 100644
--- a/third_party/nix/src/libstore/binary-cache-store.hh
+++ b/third_party/nix/src/libstore/binary-cache-store.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <atomic>
+
 #include "crypto.hh"
 #include "pool.hh"
 #include "store-api.hh"
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc
index c9acb4dfb4a0..7da262206abd 100644
--- a/third_party/nix/src/libstore/build.cc
+++ b/third_party/nix/src/libstore/build.cc
@@ -1,3 +1,14 @@
+#include <algorithm>
+#include <chrono>
+#include <cstring>
+#include <future>
+#include <iostream>
+#include <map>
+#include <queue>
+#include <regex>
+#include <sstream>
+#include <thread>
+
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
@@ -14,16 +25,7 @@
 #include <sys/wait.h>
 #include <termios.h>
 #include <unistd.h>
-#include <algorithm>
-#include <chrono>
-#include <cstring>
-#include <future>
-#include <iostream>
-#include <map>
-#include <queue>
-#include <regex>
-#include <sstream>
-#include <thread>
+
 #include "affinity.hh"
 #include "archive.hh"
 #include "builtins.hh"
diff --git a/third_party/nix/src/libstore/builtins/buildenv.cc b/third_party/nix/src/libstore/builtins/buildenv.cc
index 68b2dd0f391d..fd7d7e979f30 100644
--- a/third_party/nix/src/libstore/builtins/buildenv.cc
+++ b/third_party/nix/src/libstore/builtins/buildenv.cc
@@ -1,8 +1,10 @@
+#include <algorithm>
+
 #include <fcntl.h>
 #include <glog/logging.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <algorithm>
+
 #include "builtins.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/builtins/fetchurl.cc b/third_party/nix/src/libstore/builtins/fetchurl.cc
index 88acc413c9da..f3ef77fbd612 100644
--- a/third_party/nix/src/libstore/builtins/fetchurl.cc
+++ b/third_party/nix/src/libstore/builtins/fetchurl.cc
@@ -1,4 +1,5 @@
 #include <glog/logging.h>
+
 #include "archive.hh"
 #include "builtins.hh"
 #include "compression.hh"
diff --git a/third_party/nix/src/libstore/crypto.cc b/third_party/nix/src/libstore/crypto.cc
index 7d1fab8161af..44c512d33b92 100644
--- a/third_party/nix/src/libstore/crypto.cc
+++ b/third_party/nix/src/libstore/crypto.cc
@@ -1,4 +1,5 @@
 #include "crypto.hh"
+
 #include "globals.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libstore/crypto.hh b/third_party/nix/src/libstore/crypto.hh
index ffafe6560d15..637099231dc0 100644
--- a/third_party/nix/src/libstore/crypto.hh
+++ b/third_party/nix/src/libstore/crypto.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <map>
+
 #include "types.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc
index e75c0d77c3ac..28f775dee1e9 100644
--- a/third_party/nix/src/libstore/derivations.cc
+++ b/third_party/nix/src/libstore/derivations.cc
@@ -1,4 +1,5 @@
 #include "derivations.hh"
+
 #include "fs-accessor.hh"
 #include "globals.hh"
 #include "istringstream_nocopy.hh"
diff --git a/third_party/nix/src/libstore/derivations.hh b/third_party/nix/src/libstore/derivations.hh
index 51a2dc44b695..11277c813e20 100644
--- a/third_party/nix/src/libstore/derivations.hh
+++ b/third_party/nix/src/libstore/derivations.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <map>
+
 #include "hash.hh"
 #include "store-api.hh"
 #include "types.hh"
diff --git a/third_party/nix/src/libstore/download.cc b/third_party/nix/src/libstore/download.cc
index d84ac0c3cb98..16719ad7b68f 100644
--- a/third_party/nix/src/libstore/download.cc
+++ b/third_party/nix/src/libstore/download.cc
@@ -1,4 +1,5 @@
 #include "download.hh"
+
 #include "archive.hh"
 #include "compression.hh"
 #include "finally.hh"
@@ -13,10 +14,6 @@
 #include <aws/core/client/ClientConfiguration.h>
 #endif
 
-#include <curl/curl.h>
-#include <fcntl.h>
-#include <glog/logging.h>
-#include <unistd.h>
 #include <algorithm>
 #include <cmath>
 #include <cstring>
@@ -25,6 +22,11 @@
 #include <random>
 #include <thread>
 
+#include <curl/curl.h>
+#include <fcntl.h>
+#include <glog/logging.h>
+#include <unistd.h>
+
 using namespace std::string_literals;
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/download.hh b/third_party/nix/src/libstore/download.hh
index 8859b093e4f3..5e7bbf4ad669 100644
--- a/third_party/nix/src/libstore/download.hh
+++ b/third_party/nix/src/libstore/download.hh
@@ -2,6 +2,7 @@
 
 #include <future>
 #include <string>
+
 #include "globals.hh"
 #include "hash.hh"
 #include "types.hh"
diff --git a/third_party/nix/src/libstore/export-import.cc b/third_party/nix/src/libstore/export-import.cc
index b38b15c6f3bc..f0af044355ff 100644
--- a/third_party/nix/src/libstore/export-import.cc
+++ b/third_party/nix/src/libstore/export-import.cc
@@ -1,4 +1,5 @@
 #include <algorithm>
+
 #include "archive.hh"
 #include "store-api.hh"
 #include "worker-protocol.hh"
diff --git a/third_party/nix/src/libstore/gc.cc b/third_party/nix/src/libstore/gc.cc
index 183b3c1a4a17..44c118bed448 100644
--- a/third_party/nix/src/libstore/gc.cc
+++ b/third_party/nix/src/libstore/gc.cc
@@ -1,15 +1,17 @@
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/statvfs.h>
-#include <sys/types.h>
-#include <unistd.h>
 #include <algorithm>
 #include <climits>
 #include <functional>
 #include <queue>
 #include <random>
 #include <regex>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/statvfs.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "derivations.hh"
 #include "finally.hh"
 #include "globals.hh"
diff --git a/third_party/nix/src/libstore/globals.cc b/third_party/nix/src/libstore/globals.cc
index 62a8a167874b..bbcf63a6f5e4 100644
--- a/third_party/nix/src/libstore/globals.cc
+++ b/third_party/nix/src/libstore/globals.cc
@@ -1,8 +1,11 @@
 #include "globals.hh"
-#include <dlfcn.h>
+
 #include <algorithm>
 #include <map>
 #include <thread>
+
+#include <dlfcn.h>
+
 #include "archive.hh"
 #include "args.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libstore/globals.hh b/third_party/nix/src/libstore/globals.hh
index 0862ae986482..7b4d614f7a67 100644
--- a/third_party/nix/src/libstore/globals.hh
+++ b/third_party/nix/src/libstore/globals.hh
@@ -1,8 +1,10 @@
 #pragma once
 
-#include <sys/types.h>
 #include <limits>
 #include <map>
+
+#include <sys/types.h>
+
 #include "config.hh"
 #include "types.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libstore/http-binary-cache-store.cc b/third_party/nix/src/libstore/http-binary-cache-store.cc
index 06935ce61d76..1bbdc46d3296 100644
--- a/third_party/nix/src/libstore/http-binary-cache-store.cc
+++ b/third_party/nix/src/libstore/http-binary-cache-store.cc
@@ -1,4 +1,5 @@
 #include <glog/logging.h>
+
 #include "binary-cache-store.hh"
 #include "download.hh"
 #include "globals.hh"
diff --git a/third_party/nix/src/libstore/local-store.cc b/third_party/nix/src/libstore/local-store.cc
index 93a1eab26baa..4c57c8a32a2b 100644
--- a/third_party/nix/src/libstore/local-store.cc
+++ b/third_party/nix/src/libstore/local-store.cc
@@ -1,4 +1,9 @@
 #include "local-store.hh"
+
+#include <algorithm>
+#include <cstring>
+#include <iostream>
+
 #include <errno.h>
 #include <fcntl.h>
 #include <glog/logging.h>
@@ -11,9 +16,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <utime.h>
-#include <algorithm>
-#include <cstring>
-#include <iostream>
+
 #include "archive.hh"
 #include "derivations.hh"
 #include "globals.hh"
diff --git a/third_party/nix/src/libstore/local-store.hh b/third_party/nix/src/libstore/local-store.hh
index 20d372fc8d37..47fa74a97be7 100644
--- a/third_party/nix/src/libstore/local-store.hh
+++ b/third_party/nix/src/libstore/local-store.hh
@@ -4,6 +4,7 @@
 #include <future>
 #include <string>
 #include <unordered_set>
+
 #include "pathlocks.hh"
 #include "sqlite.hh"
 #include "store-api.hh"
diff --git a/third_party/nix/src/libstore/machines.cc b/third_party/nix/src/libstore/machines.cc
index 0bd65c230253..99a32f653b8d 100644
--- a/third_party/nix/src/libstore/machines.cc
+++ b/third_party/nix/src/libstore/machines.cc
@@ -1,6 +1,9 @@
 #include "machines.hh"
-#include <glog/logging.h>
+
 #include <algorithm>
+
+#include <glog/logging.h>
+
 #include "globals.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libstore/misc.cc b/third_party/nix/src/libstore/misc.cc
index 513940459736..60b5a9d078b1 100644
--- a/third_party/nix/src/libstore/misc.cc
+++ b/third_party/nix/src/libstore/misc.cc
@@ -1,4 +1,5 @@
 #include <glog/logging.h>
+
 #include "derivations.hh"
 #include "globals.hh"
 #include "local-store.hh"
diff --git a/third_party/nix/src/libstore/nar-accessor.cc b/third_party/nix/src/libstore/nar-accessor.cc
index f5073ad98076..b36f75401bd3 100644
--- a/third_party/nix/src/libstore/nar-accessor.cc
+++ b/third_party/nix/src/libstore/nar-accessor.cc
@@ -1,8 +1,10 @@
 #include "nar-accessor.hh"
+
 #include <algorithm>
 #include <map>
 #include <nlohmann/json.hpp>
 #include <stack>
+
 #include "archive.hh"
 #include "json.hh"
 
diff --git a/third_party/nix/src/libstore/nar-accessor.hh b/third_party/nix/src/libstore/nar-accessor.hh
index eb6cf0fe736e..d4bd7366f87d 100644
--- a/third_party/nix/src/libstore/nar-accessor.hh
+++ b/third_party/nix/src/libstore/nar-accessor.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <functional>
+
 #include "fs-accessor.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/nar-info-disk-cache.cc b/third_party/nix/src/libstore/nar-info-disk-cache.cc
index cbd1f5a12ab2..6d40f4abc6a8 100644
--- a/third_party/nix/src/libstore/nar-info-disk-cache.cc
+++ b/third_party/nix/src/libstore/nar-info-disk-cache.cc
@@ -1,6 +1,8 @@
 #include "nar-info-disk-cache.hh"
+
 #include <glog/logging.h>
 #include <sqlite3.h>
+
 #include "globals.hh"
 #include "sqlite.hh"
 #include "sync.hh"
diff --git a/third_party/nix/src/libstore/nar-info.cc b/third_party/nix/src/libstore/nar-info.cc
index bf195290d040..492ccc08daf8 100644
--- a/third_party/nix/src/libstore/nar-info.cc
+++ b/third_party/nix/src/libstore/nar-info.cc
@@ -1,4 +1,5 @@
 #include "nar-info.hh"
+
 #include "globals.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/optimise-store.cc b/third_party/nix/src/libstore/optimise-store.cc
index 98bff94e978d..215eec94fa2e 100644
--- a/third_party/nix/src/libstore/optimise-store.cc
+++ b/third_party/nix/src/libstore/optimise-store.cc
@@ -1,11 +1,13 @@
+#include <cstdlib>
+#include <cstring>
+#include <regex>
+
 #include <errno.h>
 #include <stdio.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <cstdlib>
-#include <cstring>
-#include <regex>
+
 #include "globals.hh"
 #include "glog/logging.h"
 #include "local-store.hh"
diff --git a/third_party/nix/src/libstore/parsed-derivations.hh b/third_party/nix/src/libstore/parsed-derivations.hh
index 70424b2ce187..7b2da3b566ac 100644
--- a/third_party/nix/src/libstore/parsed-derivations.hh
+++ b/third_party/nix/src/libstore/parsed-derivations.hh
@@ -1,4 +1,5 @@
 #include <nlohmann/json.hpp>
+
 #include "derivations.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/pathlocks.cc b/third_party/nix/src/libstore/pathlocks.cc
index 986b5438457a..d71717e73ed2 100644
--- a/third_party/nix/src/libstore/pathlocks.cc
+++ b/third_party/nix/src/libstore/pathlocks.cc
@@ -1,11 +1,14 @@
 #include "pathlocks.hh"
+
+#include <cerrno>
+#include <cstdlib>
+
 #include <fcntl.h>
 #include <glog/logging.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <cerrno>
-#include <cstdlib>
+
 #include "sync.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libstore/profiles.cc b/third_party/nix/src/libstore/profiles.cc
index 51379710e22f..3e7126bb3343 100644
--- a/third_party/nix/src/libstore/profiles.cc
+++ b/third_party/nix/src/libstore/profiles.cc
@@ -1,10 +1,12 @@
 #include "profiles.hh"
+
 #include <errno.h>
 #include <glog/logging.h>
 #include <stdio.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+
 #include "store-api.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libstore/profiles.hh b/third_party/nix/src/libstore/profiles.hh
index c23fe1f8598d..b1c3f0948713 100644
--- a/third_party/nix/src/libstore/profiles.hh
+++ b/third_party/nix/src/libstore/profiles.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <time.h>
+
 #include "pathlocks.hh"
 #include "types.hh"
 
diff --git a/third_party/nix/src/libstore/references.cc b/third_party/nix/src/libstore/references.cc
index 5413bfb5cf74..d8c4620a16c9 100644
--- a/third_party/nix/src/libstore/references.cc
+++ b/third_party/nix/src/libstore/references.cc
@@ -1,7 +1,10 @@
 #include "references.hh"
-#include <glog/logging.h>
+
 #include <cstdlib>
 #include <map>
+
+#include <glog/logging.h>
+
 #include "archive.hh"
 #include "hash.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libstore/remote-fs-accessor.cc b/third_party/nix/src/libstore/remote-fs-accessor.cc
index 044b9ab5f931..63a0f58fda51 100644
--- a/third_party/nix/src/libstore/remote-fs-accessor.cc
+++ b/third_party/nix/src/libstore/remote-fs-accessor.cc
@@ -1,7 +1,9 @@
 #include "remote-fs-accessor.hh"
+
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+
 #include "json.hh"
 #include "nar-accessor.hh"
 
diff --git a/third_party/nix/src/libstore/remote-store.cc b/third_party/nix/src/libstore/remote-store.cc
index ce2fc3888774..39c908afed3a 100644
--- a/third_party/nix/src/libstore/remote-store.cc
+++ b/third_party/nix/src/libstore/remote-store.cc
@@ -1,4 +1,7 @@
 #include "remote-store.hh"
+
+#include <cstring>
+
 #include <errno.h>
 #include <fcntl.h>
 #include <glog/logging.h>
@@ -7,7 +10,7 @@
 #include <sys/types.h>
 #include <sys/un.h>
 #include <unistd.h>
-#include <cstring>
+
 #include "affinity.hh"
 #include "archive.hh"
 #include "derivations.hh"
diff --git a/third_party/nix/src/libstore/remote-store.hh b/third_party/nix/src/libstore/remote-store.hh
index dd37b83f84a5..f2692193433e 100644
--- a/third_party/nix/src/libstore/remote-store.hh
+++ b/third_party/nix/src/libstore/remote-store.hh
@@ -2,6 +2,7 @@
 
 #include <limits>
 #include <string>
+
 #include "store-api.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/s3-binary-cache-store.cc b/third_party/nix/src/libstore/s3-binary-cache-store.cc
index 8730c2dd4df2..1249a92d3f58 100644
--- a/third_party/nix/src/libstore/s3-binary-cache-store.cc
+++ b/third_party/nix/src/libstore/s3-binary-cache-store.cc
@@ -1,6 +1,7 @@
 #if ENABLE_S3
 
 #include "s3-binary-cache-store.hh"
+
 #include <aws/core/Aws.h>
 #include <aws/core/VersionConfig.h>
 #include <aws/core/auth/AWSCredentialsProvider.h>
@@ -16,6 +17,7 @@
 #include <aws/s3/model/ListObjectsRequest.h>
 #include <aws/s3/model/PutObjectRequest.h>
 #include <aws/transfer/TransferManager.h>
+
 #include "compression.hh"
 #include "download.hh"
 #include "globals.hh"
diff --git a/third_party/nix/src/libstore/s3-binary-cache-store.hh b/third_party/nix/src/libstore/s3-binary-cache-store.hh
index b9ed04ed112f..24cb67721a92 100644
--- a/third_party/nix/src/libstore/s3-binary-cache-store.hh
+++ b/third_party/nix/src/libstore/s3-binary-cache-store.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <atomic>
+
 #include "binary-cache-store.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/sqlite.cc b/third_party/nix/src/libstore/sqlite.cc
index aa6c15ec1595..85d159d620ec 100644
--- a/third_party/nix/src/libstore/sqlite.cc
+++ b/third_party/nix/src/libstore/sqlite.cc
@@ -1,7 +1,10 @@
 #include "sqlite.hh"
+
+#include <atomic>
+
 #include <glog/logging.h>
 #include <sqlite3.h>
-#include <atomic>
+
 #include "util.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libstore/sqlite.hh b/third_party/nix/src/libstore/sqlite.hh
index 633a12189a6c..298bb574ea2d 100644
--- a/third_party/nix/src/libstore/sqlite.hh
+++ b/third_party/nix/src/libstore/sqlite.hh
@@ -2,6 +2,7 @@
 
 #include <functional>
 #include <string>
+
 #include "types.hh"
 
 class sqlite3;
diff --git a/third_party/nix/src/libstore/store-api.cc b/third_party/nix/src/libstore/store-api.cc
index 12b9b1def4bb..2ea478c1bddf 100644
--- a/third_party/nix/src/libstore/store-api.cc
+++ b/third_party/nix/src/libstore/store-api.cc
@@ -1,6 +1,9 @@
 #include "store-api.hh"
-#include <glog/logging.h>
+
 #include <future>
+
+#include <glog/logging.h>
+
 #include "crypto.hh"
 #include "derivations.hh"
 #include "globals.hh"
diff --git a/third_party/nix/src/libstore/store-api.hh b/third_party/nix/src/libstore/store-api.hh
index a1106dbfeb53..d4e207128bc2 100644
--- a/third_party/nix/src/libstore/store-api.hh
+++ b/third_party/nix/src/libstore/store-api.hh
@@ -7,6 +7,7 @@
 #include <string>
 #include <unordered_map>
 #include <unordered_set>
+
 #include "config.hh"
 #include "crypto.hh"
 #include "globals.hh"
diff --git a/third_party/nix/src/libutil/affinity.cc b/third_party/nix/src/libutil/affinity.cc
index af3bc152f402..b6aedc77e54a 100644
--- a/third_party/nix/src/libutil/affinity.cc
+++ b/third_party/nix/src/libutil/affinity.cc
@@ -1,5 +1,7 @@
 #include "affinity.hh"
+
 #include <glog/logging.h>
+
 #include "types.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libutil/archive.cc b/third_party/nix/src/libutil/archive.cc
index 8f98a3daf301..c6ee5fcb2a93 100644
--- a/third_party/nix/src/libutil/archive.cc
+++ b/third_party/nix/src/libutil/archive.cc
@@ -1,14 +1,17 @@
 #include "archive.hh"
+
+#include <algorithm>
+#include <cerrno>
+#include <map>
+#include <vector>
+
 #include <dirent.h>
 #include <fcntl.h>
 #include <strings.h>  // for strcasecmp
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <algorithm>
-#include <cerrno>
-#include <map>
-#include <vector>
+
 #include "config.hh"
 #include "glog/logging.h"
 #include "util.hh"
diff --git a/third_party/nix/src/libutil/args.cc b/third_party/nix/src/libutil/args.cc
index b5bfb0e6a746..2199099e7cba 100644
--- a/third_party/nix/src/libutil/args.cc
+++ b/third_party/nix/src/libutil/args.cc
@@ -1,4 +1,5 @@
 #include "args.hh"
+
 #include "hash.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libutil/args.hh b/third_party/nix/src/libutil/args.hh
index dc41a6849b40..ba6582abe424 100644
--- a/third_party/nix/src/libutil/args.hh
+++ b/third_party/nix/src/libutil/args.hh
@@ -3,6 +3,7 @@
 #include <iostream>
 #include <map>
 #include <memory>
+
 #include "util.hh"
 
 namespace nix {
diff --git a/third_party/nix/src/libutil/compression.cc b/third_party/nix/src/libutil/compression.cc
index 1f284b097054..b025e33683c8 100644
--- a/third_party/nix/src/libutil/compression.cc
+++ b/third_party/nix/src/libutil/compression.cc
@@ -1,11 +1,14 @@
 #include "compression.hh"
+
+#include <cstdio>
+#include <cstring>
+#include <iostream>
+
 #include <brotli/decode.h>
 #include <brotli/encode.h>
 #include <bzlib.h>
 #include <lzma.h>
-#include <cstdio>
-#include <cstring>
-#include <iostream>
+
 #include "finally.hh"
 #include "glog/logging.h"
 #include "util.hh"
diff --git a/third_party/nix/src/libutil/compression.hh b/third_party/nix/src/libutil/compression.hh
index 405863f3be02..80b651e107d4 100644
--- a/third_party/nix/src/libutil/compression.hh
+++ b/third_party/nix/src/libutil/compression.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <string>
+
 #include "ref.hh"
 #include "serialise.hh"
 #include "types.hh"
diff --git a/third_party/nix/src/libutil/config.cc b/third_party/nix/src/libutil/config.cc
index 93550fafa3d6..83dbf8b6e54f 100644
--- a/third_party/nix/src/libutil/config.cc
+++ b/third_party/nix/src/libutil/config.cc
@@ -1,6 +1,8 @@
 #define GOOGLE_STRIP_LOG 0
 #include "config.hh"
+
 #include <glog/logging.h>
+
 #include "args.hh"
 #include "json.hh"
 // #include <glog/log_severity.h>
diff --git a/third_party/nix/src/libutil/config.hh b/third_party/nix/src/libutil/config.hh
index 375fefa52b7c..9735569d1084 100644
--- a/third_party/nix/src/libutil/config.hh
+++ b/third_party/nix/src/libutil/config.hh
@@ -1,5 +1,6 @@
 #include <map>
 #include <set>
+
 #include "types.hh"
 
 #pragma once
diff --git a/third_party/nix/src/libutil/hash.cc b/third_party/nix/src/libutil/hash.cc
index 647822213278..18b3c89795e8 100644
--- a/third_party/nix/src/libutil/hash.cc
+++ b/third_party/nix/src/libutil/hash.cc
@@ -1,11 +1,14 @@
 #include "hash.hh"
+
+#include <cstring>
+#include <iostream>
+
 #include <fcntl.h>
 #include <openssl/md5.h>
 #include <openssl/sha.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <cstring>
-#include <iostream>
+
 #include "archive.hh"
 #include "istringstream_nocopy.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/libutil/json.cc b/third_party/nix/src/libutil/json.cc
index 37cae1680155..3e5608c582fa 100644
--- a/third_party/nix/src/libutil/json.cc
+++ b/third_party/nix/src/libutil/json.cc
@@ -1,4 +1,5 @@
 #include "json.hh"
+
 #include <cstring>
 #include <iomanip>
 
diff --git a/third_party/nix/src/libutil/monitor-fd.hh b/third_party/nix/src/libutil/monitor-fd.hh
index faf79e6381d2..54e9de848a13 100644
--- a/third_party/nix/src/libutil/monitor-fd.hh
+++ b/third_party/nix/src/libutil/monitor-fd.hh
@@ -1,12 +1,13 @@
 #pragma once
 
+#include <atomic>
+#include <cstdlib>
+#include <thread>
+
 #include <poll.h>
 #include <signal.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <atomic>
-#include <cstdlib>
-#include <thread>
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/pool.hh b/third_party/nix/src/libutil/pool.hh
index 592bd50897cc..e25d82d8ec11 100644
--- a/third_party/nix/src/libutil/pool.hh
+++ b/third_party/nix/src/libutil/pool.hh
@@ -5,6 +5,7 @@
 #include <limits>
 #include <list>
 #include <memory>
+
 #include "ref.hh"
 #include "sync.hh"
 
diff --git a/third_party/nix/src/libutil/serialise.cc b/third_party/nix/src/libutil/serialise.cc
index 1014ef8f70c3..187642df66fc 100644
--- a/third_party/nix/src/libutil/serialise.cc
+++ b/third_party/nix/src/libutil/serialise.cc
@@ -1,8 +1,10 @@
 #include "serialise.hh"
+
 #include <boost/coroutine2/coroutine.hpp>
 #include <cerrno>
 #include <cstring>
 #include <memory>
+
 #include "glog/logging.h"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libutil/serialise.hh b/third_party/nix/src/libutil/serialise.hh
index 2ab4bdff6f46..d8c8b181f411 100644
--- a/third_party/nix/src/libutil/serialise.hh
+++ b/third_party/nix/src/libutil/serialise.hh
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <memory>
+
 #include "types.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libutil/thread-pool.cc b/third_party/nix/src/libutil/thread-pool.cc
index 3f50b6aaa2e6..ee727aacd02a 100644
--- a/third_party/nix/src/libutil/thread-pool.cc
+++ b/third_party/nix/src/libutil/thread-pool.cc
@@ -1,4 +1,5 @@
 #include "thread-pool.hh"
+
 #include "affinity.hh"
 #include "glog/logging.h"
 
diff --git a/third_party/nix/src/libutil/thread-pool.hh b/third_party/nix/src/libutil/thread-pool.hh
index 18fd208b1bb4..d709c9dbc855 100644
--- a/third_party/nix/src/libutil/thread-pool.hh
+++ b/third_party/nix/src/libutil/thread-pool.hh
@@ -5,6 +5,7 @@
 #include <map>
 #include <queue>
 #include <thread>
+
 #include "sync.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/libutil/types.hh b/third_party/nix/src/libutil/types.hh
index 25e9d23017cf..ac1b802ce0f1 100644
--- a/third_party/nix/src/libutil/types.hh
+++ b/third_party/nix/src/libutil/types.hh
@@ -6,6 +6,7 @@
 #include <memory>
 #include <set>
 #include <string>
+
 #include "ref.hh"
 
 /* Before 4.7, gcc's std::exception uses empty throw() specifiers for
diff --git a/third_party/nix/src/libutil/util.cc b/third_party/nix/src/libutil/util.cc
index 21c14b0cf5d7..941680b70a70 100644
--- a/third_party/nix/src/libutil/util.cc
+++ b/third_party/nix/src/libutil/util.cc
@@ -1,12 +1,5 @@
 #include "util.hh"
-#include <fcntl.h>
-#include <grp.h>
-#include <limits.h>
-#include <pwd.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
+
 #include <cctype>
 #include <cerrno>
 #include <cstdio>
@@ -16,6 +9,16 @@
 #include <iostream>
 #include <sstream>
 #include <thread>
+
+#include <fcntl.h>
+#include <grp.h>
+#include <limits.h>
+#include <pwd.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
 #include "affinity.hh"
 #include "finally.hh"
 #include "glog/logging.h"
diff --git a/third_party/nix/src/libutil/util.hh b/third_party/nix/src/libutil/util.hh
index 25e647325c83..3ebe18f54837 100644
--- a/third_party/nix/src/libutil/util.hh
+++ b/third_party/nix/src/libutil/util.hh
@@ -1,10 +1,5 @@
 #pragma once
 
-#include <dirent.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
 #include <cstdio>
 #include <functional>
 #include <future>
@@ -12,6 +7,13 @@
 #include <map>
 #include <optional>
 #include <sstream>
+
+#include <dirent.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "types.hh"
 
 #ifndef HAVE_STRUCT_DIRENT_D_TYPE
diff --git a/third_party/nix/src/libutil/xml-writer.cc b/third_party/nix/src/libutil/xml-writer.cc
index cabf7812128e..77e63395f224 100644
--- a/third_party/nix/src/libutil/xml-writer.cc
+++ b/third_party/nix/src/libutil/xml-writer.cc
@@ -1,4 +1,5 @@
 #include "xml-writer.hh"
+
 #include <assert.h>
 
 namespace nix {
diff --git a/third_party/nix/src/nix-build/nix-build.cc b/third_party/nix/src/nix-build/nix-build.cc
index 0e6a5631f951..621fd987b379 100644
--- a/third_party/nix/src/nix-build/nix-build.cc
+++ b/third_party/nix/src/nix-build/nix-build.cc
@@ -1,10 +1,12 @@
-#include <glog/logging.h>
 #include <cstring>
 #include <fstream>
 #include <iostream>
 #include <regex>
 #include <sstream>
 #include <vector>
+
+#include <glog/logging.h>
+
 #include "affinity.hh"
 #include "attr-path.hh"
 #include "common-eval-args.hh"
diff --git a/third_party/nix/src/nix-channel/nix-channel.cc b/third_party/nix/src/nix-channel/nix-channel.cc
index eda8d827ae30..40a3c4464d48 100644
--- a/third_party/nix/src/nix-channel/nix-channel.cc
+++ b/third_party/nix/src/nix-channel/nix-channel.cc
@@ -1,6 +1,8 @@
+#include <regex>
+
 #include <fcntl.h>
 #include <pwd.h>
-#include <regex>
+
 #include "download.hh"
 #include "globals.hh"
 #include "legacy.hh"
diff --git a/third_party/nix/src/nix-collect-garbage/nix-collect-garbage.cc b/third_party/nix/src/nix-collect-garbage/nix-collect-garbage.cc
index 6c78c1d2709a..ac6565203619 100644
--- a/third_party/nix/src/nix-collect-garbage/nix-collect-garbage.cc
+++ b/third_party/nix/src/nix-collect-garbage/nix-collect-garbage.cc
@@ -1,6 +1,8 @@
-#include <glog/logging.h>
 #include <cerrno>
 #include <iostream>
+
+#include <glog/logging.h>
+
 #include "globals.hh"
 #include "legacy.hh"
 #include "profiles.hh"
diff --git a/third_party/nix/src/nix-copy-closure/nix-copy-closure.cc b/third_party/nix/src/nix-copy-closure/nix-copy-closure.cc
index e4ae1bb35ad6..46b326a918ed 100644
--- a/third_party/nix/src/nix-copy-closure/nix-copy-closure.cc
+++ b/third_party/nix/src/nix-copy-closure/nix-copy-closure.cc
@@ -1,4 +1,5 @@
 #include <glog/logging.h>
+
 #include "legacy.hh"
 #include "shared.hh"
 #include "store-api.hh"
diff --git a/third_party/nix/src/nix-daemon/nix-daemon.cc b/third_party/nix/src/nix-daemon/nix-daemon.cc
index fdb86eaf9110..7d9c0a734aeb 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon.cc
@@ -1,3 +1,6 @@
+#include <algorithm>
+#include <cstring>
+
 #include <errno.h>
 #include <fcntl.h>
 #include <glog/logging.h>
@@ -11,8 +14,7 @@
 #include <sys/un.h>
 #include <sys/wait.h>
 #include <unistd.h>
-#include <algorithm>
-#include <cstring>
+
 #include "affinity.hh"
 #include "archive.hh"
 #include "derivations.hh"
diff --git a/third_party/nix/src/nix-env/nix-env.cc b/third_party/nix/src/nix-env/nix-env.cc
index b89003bec648..badea909b5b3 100644
--- a/third_party/nix/src/nix-env/nix-env.cc
+++ b/third_party/nix/src/nix-env/nix-env.cc
@@ -1,12 +1,14 @@
-#include <glog/logging.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
 #include <algorithm>
 #include <cerrno>
 #include <ctime>
 #include <iostream>
 #include <sstream>
+
+#include <glog/logging.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "attr-path.hh"
 #include "common-eval-args.hh"
 #include "derivations.hh"
diff --git a/third_party/nix/src/nix-env/user-env.cc b/third_party/nix/src/nix-env/user-env.cc
index b8d168c8355b..c35959c5329b 100644
--- a/third_party/nix/src/nix-env/user-env.cc
+++ b/third_party/nix/src/nix-env/user-env.cc
@@ -1,5 +1,7 @@
 #include "user-env.hh"
+
 #include <glog/logging.h>
+
 #include "derivations.hh"
 #include "eval-inline.hh"
 #include "eval.hh"
diff --git a/third_party/nix/src/nix-instantiate/nix-instantiate.cc b/third_party/nix/src/nix-instantiate/nix-instantiate.cc
index cd1ebce97b0c..15b07a8545e4 100644
--- a/third_party/nix/src/nix-instantiate/nix-instantiate.cc
+++ b/third_party/nix/src/nix-instantiate/nix-instantiate.cc
@@ -1,5 +1,6 @@
 #include <iostream>
 #include <map>
+
 #include "attr-path.hh"
 #include "common-eval-args.hh"
 #include "eval-inline.hh"
diff --git a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
index 0f6b9454c0bf..d1a34842bc7a 100644
--- a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
+++ b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
@@ -1,8 +1,10 @@
+#include <iostream>
+
 #include <fcntl.h>
 #include <glog/logging.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <iostream>
+
 #include "attr-path.hh"
 #include "common-eval-args.hh"
 #include "download.hh"
diff --git a/third_party/nix/src/nix-store/dotgraph.cc b/third_party/nix/src/nix-store/dotgraph.cc
index daec3da311d4..710d781c7edb 100644
--- a/third_party/nix/src/nix-store/dotgraph.cc
+++ b/third_party/nix/src/nix-store/dotgraph.cc
@@ -1,5 +1,7 @@
 #include "dotgraph.hh"
+
 #include <iostream>
+
 #include "store-api.hh"
 #include "util.hh"
 
diff --git a/third_party/nix/src/nix-store/graphml.cc b/third_party/nix/src/nix-store/graphml.cc
index 299468ab9d5e..a48b19bf9636 100644
--- a/third_party/nix/src/nix-store/graphml.cc
+++ b/third_party/nix/src/nix-store/graphml.cc
@@ -1,5 +1,7 @@
 #include "graphml.hh"
+
 #include <iostream>
+
 #include "derivations.hh"
 #include "store-api.hh"
 #include "util.hh"
diff --git a/third_party/nix/src/nix-store/nix-store.cc b/third_party/nix/src/nix-store/nix-store.cc
index 0e42dfd34a43..126045fff7df 100644
--- a/third_party/nix/src/nix-store/nix-store.cc
+++ b/third_party/nix/src/nix-store/nix-store.cc
@@ -1,10 +1,12 @@
+#include <algorithm>
+#include <cstdio>
+#include <iostream>
+
 #include <fcntl.h>
 #include <glog/logging.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <algorithm>
-#include <cstdio>
-#include <iostream>
+
 #include "archive.hh"
 #include "derivations.hh"
 #include "dotgraph.hh"
diff --git a/third_party/nix/src/nix/command.cc b/third_party/nix/src/nix/command.cc
index 5565e49f56f2..cf109c441612 100644
--- a/third_party/nix/src/nix/command.cc
+++ b/third_party/nix/src/nix/command.cc
@@ -1,4 +1,5 @@
 #include "command.hh"
+
 #include "derivations.hh"
 #include "store-api.hh"
 
diff --git a/third_party/nix/src/nix/copy.cc b/third_party/nix/src/nix/copy.cc
index 030a13a3d019..fe5e37363c30 100644
--- a/third_party/nix/src/nix/copy.cc
+++ b/third_party/nix/src/nix/copy.cc
@@ -1,4 +1,5 @@
 #include <atomic>
+
 #include "command.hh"
 #include "shared.hh"
 #include "store-api.hh"
diff --git a/third_party/nix/src/nix/edit.cc b/third_party/nix/src/nix/edit.cc
index 631cae60ebc7..61d700592b76 100644
--- a/third_party/nix/src/nix/edit.cc
+++ b/third_party/nix/src/nix/edit.cc
@@ -1,5 +1,6 @@
 #include <glog/logging.h>
 #include <unistd.h>
+
 #include "attr-path.hh"
 #include "command.hh"
 #include "eval.hh"
diff --git a/third_party/nix/src/nix/eval.cc b/third_party/nix/src/nix/eval.cc
index 9da265a641bd..d84b86bc531e 100644
--- a/third_party/nix/src/nix/eval.cc
+++ b/third_party/nix/src/nix/eval.cc
@@ -1,4 +1,5 @@
 #include "eval.hh"
+
 #include "command.hh"
 #include "common-args.hh"
 #include "json.hh"
diff --git a/third_party/nix/src/nix/hash.cc b/third_party/nix/src/nix/hash.cc
index 11fefb7939f1..e3278ea77a59 100644
--- a/third_party/nix/src/nix/hash.cc
+++ b/third_party/nix/src/nix/hash.cc
@@ -1,4 +1,5 @@
 #include "hash.hh"
+
 #include "command.hh"
 #include "legacy.hh"
 #include "shared.hh"
diff --git a/third_party/nix/src/nix/installables.cc b/third_party/nix/src/nix/installables.cc
index 8a2a5fd19d94..00cb71a231fa 100644
--- a/third_party/nix/src/nix/installables.cc
+++ b/third_party/nix/src/nix/installables.cc
@@ -1,4 +1,5 @@
 #include <regex>
+
 #include "attr-path.hh"
 #include "command.hh"
 #include "common-eval-args.hh"
diff --git a/third_party/nix/src/nix/log.cc b/third_party/nix/src/nix/log.cc
index 3dab7746dd99..0a10924cad7b 100644
--- a/third_party/nix/src/nix/log.cc
+++ b/third_party/nix/src/nix/log.cc
@@ -1,4 +1,5 @@
 #include <glog/logging.h>
+
 #include "command.hh"
 #include "common-args.hh"
 #include "shared.hh"
diff --git a/third_party/nix/src/nix/main.cc b/third_party/nix/src/nix/main.cc
index cc4b8aef8411..6e4db63cce0a 100644
--- a/third_party/nix/src/nix/main.cc
+++ b/third_party/nix/src/nix/main.cc
@@ -1,9 +1,11 @@
+#include <algorithm>
+
 #include <ifaddrs.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <sys/types.h>
-#include <algorithm>
+
 #include "command.hh"
 #include "common-args.hh"
 #include "download.hh"
diff --git a/third_party/nix/src/nix/optimise-store.cc b/third_party/nix/src/nix/optimise-store.cc
index 49871df680bc..7814a1bcabf0 100644
--- a/third_party/nix/src/nix/optimise-store.cc
+++ b/third_party/nix/src/nix/optimise-store.cc
@@ -1,4 +1,5 @@
 #include <atomic>
+
 #include "command.hh"
 #include "shared.hh"
 #include "store-api.hh"
diff --git a/third_party/nix/src/nix/path-info.cc b/third_party/nix/src/nix/path-info.cc
index bd12be5c2311..31f2897a81c8 100644
--- a/third_party/nix/src/nix/path-info.cc
+++ b/third_party/nix/src/nix/path-info.cc
@@ -1,5 +1,6 @@
 #include <algorithm>
 #include <array>
+
 #include "command.hh"
 #include "common-args.hh"
 #include "json.hh"
diff --git a/third_party/nix/src/nix/repl.cc b/third_party/nix/src/nix/repl.cc
index c47338073444..27bb77071f73 100644
--- a/third_party/nix/src/nix/repl.cc
+++ b/third_party/nix/src/nix/repl.cc
@@ -1,10 +1,11 @@
-#include <glog/logging.h>
-#include <setjmp.h>
 #include <climits>
 #include <cstdlib>
 #include <cstring>
 #include <iostream>
 
+#include <glog/logging.h>
+#include <setjmp.h>
+
 #ifdef READLINE
 #include <readline/history.h>
 #include <readline/readline.h>
diff --git a/third_party/nix/src/nix/search.cc b/third_party/nix/src/nix/search.cc
index 90aea17a6e39..b7cb586b0f4d 100644
--- a/third_party/nix/src/nix/search.cc
+++ b/third_party/nix/src/nix/search.cc
@@ -1,6 +1,8 @@
-#include <glog/logging.h>
 #include <fstream>
 #include <regex>
+
+#include <glog/logging.h>
+
 #include "command.hh"
 #include "common-args.hh"
 #include "eval-inline.hh"
diff --git a/third_party/nix/src/nix/sigs.cc b/third_party/nix/src/nix/sigs.cc
index 78ac8612e778..cc9d579909e2 100644
--- a/third_party/nix/src/nix/sigs.cc
+++ b/third_party/nix/src/nix/sigs.cc
@@ -1,5 +1,7 @@
-#include <glog/logging.h>
 #include <atomic>
+
+#include <glog/logging.h>
+
 #include "command.hh"
 #include "shared.hh"
 #include "store-api.hh"
diff --git a/third_party/nix/src/nix/upgrade-nix.cc b/third_party/nix/src/nix/upgrade-nix.cc
index 96ce2305db60..49f8db3b5b5f 100644
--- a/third_party/nix/src/nix/upgrade-nix.cc
+++ b/third_party/nix/src/nix/upgrade-nix.cc
@@ -1,4 +1,5 @@
 #include <glog/logging.h>
+
 #include "attr-path.hh"
 #include "command.hh"
 #include "common-args.hh"
diff --git a/third_party/nix/src/nix/verify.cc b/third_party/nix/src/nix/verify.cc
index 73c3649b1470..67128d866858 100644
--- a/third_party/nix/src/nix/verify.cc
+++ b/third_party/nix/src/nix/verify.cc
@@ -1,5 +1,7 @@
-#include <glog/logging.h>
 #include <atomic>
+
+#include <glog/logging.h>
+
 #include "command.hh"
 #include "shared.hh"
 #include "store-api.hh"
diff --git a/third_party/nix/src/nix/why-depends.cc b/third_party/nix/src/nix/why-depends.cc
index e169d1c5085a..88e1e357f4b4 100644
--- a/third_party/nix/src/nix/why-depends.cc
+++ b/third_party/nix/src/nix/why-depends.cc
@@ -1,5 +1,7 @@
-#include <glog/logging.h>
 #include <queue>
+
+#include <glog/logging.h>
+
 #include "command.hh"
 #include "fs-accessor.hh"
 #include "shared.hh"
diff --git a/third_party/nix/src/resolve-system-dependencies/resolve-system-dependencies.cc b/third_party/nix/src/resolve-system-dependencies/resolve-system-dependencies.cc
index 1b20d65e0b84..f6c01e3ec184 100644
--- a/third_party/nix/src/resolve-system-dependencies/resolve-system-dependencies.cc
+++ b/third_party/nix/src/resolve-system-dependencies/resolve-system-dependencies.cc
@@ -1,11 +1,13 @@
+#include <algorithm>
+#include <fstream>
+#include <iostream>
+
 #include <fcntl.h>
 #include <mach-o/loader.h>
 #include <mach-o/swap.h>
 #include <sys/mman.h>
 #include <sys/utsname.h>
-#include <algorithm>
-#include <fstream>
-#include <iostream>
+
 #include "derivations.hh"
 #include "globals.hh"
 #include "shared.hh"