about summary refs log tree commit diff
path: root/third_party/nix/src/libstore
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-27T20·56+0100
committerVincent Ambo <tazjin@google.com>2020-05-27T20·56+0100
commit3652326ed281f5f753423acef51103fb8df62a6d (patch)
tree3e6969ccaa13e77eb42f887cd081b45d7fffed80 /third_party/nix/src/libstore
parent86a35d963d7b6108dec44411c8ebd5aadbb148ac (diff)
refactor(3p/nix): Anchor local includes at src/ r/865
Previously all includes were anchored in one global mess of header
files. This moves the includes into filesystem "namespaces" (if you
will) for each sub-package of Nix.

Note: This commit does not introduce the relevant build system changes.
Diffstat (limited to 'third_party/nix/src/libstore')
-rw-r--r--third_party/nix/src/libstore/binary-cache-store.cc28
-rw-r--r--third_party/nix/src/libstore/binary-cache-store.hh6
-rw-r--r--third_party/nix/src/libstore/build.cc32
-rw-r--r--third_party/nix/src/libstore/builtins.hh2
-rw-r--r--third_party/nix/src/libstore/builtins/buildenv.cc2
-rw-r--r--third_party/nix/src/libstore/builtins/fetchurl.cc10
-rw-r--r--third_party/nix/src/libstore/crypto.cc6
-rw-r--r--third_party/nix/src/libstore/crypto.hh2
-rw-r--r--third_party/nix/src/libstore/derivations.cc14
-rw-r--r--third_party/nix/src/libstore/derivations.hh6
-rw-r--r--third_party/nix/src/libstore/download.cc20
-rw-r--r--third_party/nix/src/libstore/download.hh6
-rw-r--r--third_party/nix/src/libstore/export-import.cc6
-rw-r--r--third_party/nix/src/libstore/fs-accessor.hh2
-rw-r--r--third_party/nix/src/libstore/gc.cc10
-rw-r--r--third_party/nix/src/libstore/globals.cc9
-rw-r--r--third_party/nix/src/libstore/globals.hh7
-rw-r--r--third_party/nix/src/libstore/http-binary-cache-store.cc8
-rw-r--r--third_party/nix/src/libstore/legacy-ssh-store.cc19
-rw-r--r--third_party/nix/src/libstore/local-binary-cache-store.cc6
-rw-r--r--third_party/nix/src/libstore/local-fs-store.cc12
-rw-r--r--third_party/nix/src/libstore/local-store.cc15
-rw-r--r--third_party/nix/src/libstore/local-store.hh10
-rw-r--r--third_party/nix/src/libstore/machines.cc6
-rw-r--r--third_party/nix/src/libstore/machines.hh2
-rw-r--r--third_party/nix/src/libstore/misc.cc12
-rw-r--r--third_party/nix/src/libstore/nar-accessor.cc6
-rw-r--r--third_party/nix/src/libstore/nar-accessor.hh2
-rw-r--r--third_party/nix/src/libstore/nar-info-disk-cache.cc8
-rw-r--r--third_party/nix/src/libstore/nar-info-disk-cache.hh4
-rw-r--r--third_party/nix/src/libstore/nar-info.cc4
-rw-r--r--third_party/nix/src/libstore/nar-info.hh6
-rw-r--r--third_party/nix/src/libstore/optimise-store.cc8
-rw-r--r--third_party/nix/src/libstore/parsed-derivations.cc2
-rw-r--r--third_party/nix/src/libstore/parsed-derivations.hh2
-rw-r--r--third_party/nix/src/libstore/pathlocks.cc6
-rw-r--r--third_party/nix/src/libstore/pathlocks.hh2
-rw-r--r--third_party/nix/src/libstore/profiles.cc6
-rw-r--r--third_party/nix/src/libstore/profiles.hh4
-rw-r--r--third_party/nix/src/libstore/references.cc8
-rw-r--r--third_party/nix/src/libstore/references.hh4
-rw-r--r--third_party/nix/src/libstore/remote-fs-accessor.cc6
-rw-r--r--third_party/nix/src/libstore/remote-fs-accessor.hh6
-rw-r--r--third_party/nix/src/libstore/remote-store.cc22
-rw-r--r--third_party/nix/src/libstore/remote-store.hh2
-rw-r--r--third_party/nix/src/libstore/s3-binary-cache-store.cc16
-rw-r--r--third_party/nix/src/libstore/s3-binary-cache-store.hh2
-rw-r--r--third_party/nix/src/libstore/s3.hh2
-rw-r--r--third_party/nix/src/libstore/sqlite.cc4
-rw-r--r--third_party/nix/src/libstore/sqlite.hh2
-rw-r--r--third_party/nix/src/libstore/ssh-store.cc14
-rw-r--r--third_party/nix/src/libstore/ssh.cc2
-rw-r--r--third_party/nix/src/libstore/ssh.hh4
-rw-r--r--third_party/nix/src/libstore/store-api.cc20
-rw-r--r--third_party/nix/src/libstore/store-api.hh14
55 files changed, 225 insertions, 221 deletions
diff --git a/third_party/nix/src/libstore/binary-cache-store.cc b/third_party/nix/src/libstore/binary-cache-store.cc
index f631c9dee231..b862ea005870 100644
--- a/third_party/nix/src/libstore/binary-cache-store.cc
+++ b/third_party/nix/src/libstore/binary-cache-store.cc
@@ -1,4 +1,4 @@
-#include "binary-cache-store.hh"
+#include "libstore/binary-cache-store.hh"
 
 #include <chrono>
 #include <future>
@@ -7,19 +7,19 @@
 #include <absl/strings/ascii.h>
 #include <absl/strings/numbers.h>
 #include <absl/strings/str_split.h>
-
-#include "archive.hh"
-#include "compression.hh"
-#include "derivations.hh"
-#include "fs-accessor.hh"
-#include "globals.hh"
-#include "glog/logging.h"
-#include "json.hh"
-#include "nar-accessor.hh"
-#include "nar-info-disk-cache.hh"
-#include "nar-info.hh"
-#include "remote-fs-accessor.hh"
-#include "sync.hh"
+#include <glog/logging.h>
+
+#include "libstore/derivations.hh"
+#include "libstore/fs-accessor.hh"
+#include "libstore/globals.hh"
+#include "libstore/nar-accessor.hh"
+#include "libstore/nar-info-disk-cache.hh"
+#include "libstore/nar-info.hh"
+#include "libstore/remote-fs-accessor.hh"
+#include "libutil/archive.hh"
+#include "libutil/compression.hh"
+#include "libutil/json.hh"
+#include "libutil/sync.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/binary-cache-store.hh b/third_party/nix/src/libstore/binary-cache-store.hh
index b8e1ccabf264..0b788152f0bc 100644
--- a/third_party/nix/src/libstore/binary-cache-store.hh
+++ b/third_party/nix/src/libstore/binary-cache-store.hh
@@ -2,9 +2,9 @@
 
 #include <atomic>
 
-#include "crypto.hh"
-#include "pool.hh"
-#include "store-api.hh"
+#include "libstore/crypto.hh"
+#include "libstore/store-api.hh"
+#include "libutil/pool.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc
index a60f5ef173e6..0b4bce182031 100644
--- a/third_party/nix/src/libstore/build.cc
+++ b/third_party/nix/src/libstore/build.cc
@@ -17,6 +17,7 @@
 #include <absl/strings/numbers.h>
 #include <absl/strings/str_split.h>
 #include <fcntl.h>
+#include <glog/logging.h>
 #include <grp.h>
 #include <netdb.h>
 #include <pwd.h>
@@ -31,22 +32,21 @@
 #include <termios.h>
 #include <unistd.h>
 
-#include "affinity.hh"
-#include "archive.hh"
-#include "builtins.hh"
-#include "compression.hh"
-#include "download.hh"
-#include "finally.hh"
-#include "globals.hh"
-#include "glog/logging.h"
-#include "json.hh"
-#include "local-store.hh"
-#include "machines.hh"
-#include "nar-info.hh"
-#include "parsed-derivations.hh"
-#include "pathlocks.hh"
-#include "references.hh"
-#include "util.hh"
+#include "libstore/builtins.hh"
+#include "libstore/download.hh"
+#include "libstore/globals.hh"
+#include "libstore/local-store.hh"
+#include "libstore/machines.hh"
+#include "libstore/nar-info.hh"
+#include "libstore/parsed-derivations.hh"
+#include "libstore/pathlocks.hh"
+#include "libstore/references.hh"
+#include "libutil/affinity.hh"
+#include "libutil/archive.hh"
+#include "libutil/compression.hh"
+#include "libutil/finally.hh"
+#include "libutil/json.hh"
+#include "libutil/util.hh"
 
 /* Includes required for chroot support. */
 #if __linux__
diff --git a/third_party/nix/src/libstore/builtins.hh b/third_party/nix/src/libstore/builtins.hh
index 07601be0f50c..bc53e78ebc33 100644
--- a/third_party/nix/src/libstore/builtins.hh
+++ b/third_party/nix/src/libstore/builtins.hh
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "derivations.hh"
+#include "libstore/derivations.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/builtins/buildenv.cc b/third_party/nix/src/libstore/builtins/buildenv.cc
index db093663bfef..95f915227bb1 100644
--- a/third_party/nix/src/libstore/builtins/buildenv.cc
+++ b/third_party/nix/src/libstore/builtins/buildenv.cc
@@ -7,7 +7,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
-#include "builtins.hh"
+#include "libstore/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 90814f6d7f0b..867a120e8d4a 100644
--- a/third_party/nix/src/libstore/builtins/fetchurl.cc
+++ b/third_party/nix/src/libstore/builtins/fetchurl.cc
@@ -1,11 +1,11 @@
 #include <absl/strings/match.h>
 #include <glog/logging.h>
 
-#include "archive.hh"
-#include "builtins.hh"
-#include "compression.hh"
-#include "download.hh"
-#include "store-api.hh"
+#include "libstore/builtins.hh"
+#include "libstore/download.hh"
+#include "libstore/store-api.hh"
+#include "libutil/archive.hh"
+#include "libutil/compression.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/crypto.cc b/third_party/nix/src/libstore/crypto.cc
index eb5bb6670738..62b3c05ff95f 100644
--- a/third_party/nix/src/libstore/crypto.cc
+++ b/third_party/nix/src/libstore/crypto.cc
@@ -1,7 +1,7 @@
-#include "crypto.hh"
+#include "libstore/crypto.hh"
 
-#include "globals.hh"
-#include "util.hh"
+#include "libstore/globals.hh"
+#include "libutil/util.hh"
 
 #if HAVE_SODIUM
 #include <sodium.h>
diff --git a/third_party/nix/src/libstore/crypto.hh b/third_party/nix/src/libstore/crypto.hh
index ef578db6d055..e282f4f8ef69 100644
--- a/third_party/nix/src/libstore/crypto.hh
+++ b/third_party/nix/src/libstore/crypto.hh
@@ -2,7 +2,7 @@
 
 #include <map>
 
-#include "types.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc
index b2590f5e28e6..64d1c6a15144 100644
--- a/third_party/nix/src/libstore/derivations.cc
+++ b/third_party/nix/src/libstore/derivations.cc
@@ -1,15 +1,15 @@
-#include "derivations.hh"
+#include "libstore/derivations.hh"
 
 #include <absl/strings/match.h>
 #include <absl/strings/str_split.h>
 #include <absl/strings/string_view.h>
 
-#include "fs-accessor.hh"
-#include "globals.hh"
-#include "istringstream_nocopy.hh"
-#include "store-api.hh"
-#include "util.hh"
-#include "worker-protocol.hh"
+#include "libstore/fs-accessor.hh"
+#include "libstore/globals.hh"
+#include "libstore/store-api.hh"
+#include "libstore/worker-protocol.hh"
+#include "libutil/istringstream_nocopy.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/derivations.hh b/third_party/nix/src/libstore/derivations.hh
index 170f09804dee..7574aa90c2c4 100644
--- a/third_party/nix/src/libstore/derivations.hh
+++ b/third_party/nix/src/libstore/derivations.hh
@@ -2,9 +2,9 @@
 
 #include <map>
 
-#include "hash.hh"
-#include "store-api.hh"
-#include "types.hh"
+#include "libstore/store-api.hh"
+#include "libutil/hash.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/download.cc b/third_party/nix/src/libstore/download.cc
index 92a63087289e..f30642d69daf 100644
--- a/third_party/nix/src/libstore/download.cc
+++ b/third_party/nix/src/libstore/download.cc
@@ -1,19 +1,19 @@
-#include "download.hh"
+#include "libstore/download.hh"
 
 #include <absl/strings/ascii.h>
 #include <absl/strings/match.h>
 #include <absl/strings/numbers.h>
 #include <absl/strings/str_split.h>
 
-#include "archive.hh"
-#include "compression.hh"
-#include "finally.hh"
-#include "globals.hh"
-#include "hash.hh"
-#include "pathlocks.hh"
-#include "s3.hh"
-#include "store-api.hh"
-#include "util.hh"
+#include "libstore/globals.hh"
+#include "libstore/pathlocks.hh"
+#include "libstore/s3.hh"
+#include "libstore/store-api.hh"
+#include "libutil/archive.hh"
+#include "libutil/compression.hh"
+#include "libutil/finally.hh"
+#include "libutil/hash.hh"
+#include "libutil/util.hh"
 
 #ifdef ENABLE_S3
 #include <aws/core/client/ClientConfiguration.h>
diff --git a/third_party/nix/src/libstore/download.hh b/third_party/nix/src/libstore/download.hh
index a988ec682669..cbfab5f40d22 100644
--- a/third_party/nix/src/libstore/download.hh
+++ b/third_party/nix/src/libstore/download.hh
@@ -3,9 +3,9 @@
 #include <future>
 #include <string>
 
-#include "globals.hh"
-#include "hash.hh"
-#include "types.hh"
+#include "libstore/globals.hh"
+#include "libutil/hash.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/export-import.cc b/third_party/nix/src/libstore/export-import.cc
index 077b0d539001..8e9314433990 100644
--- a/third_party/nix/src/libstore/export-import.cc
+++ b/third_party/nix/src/libstore/export-import.cc
@@ -1,8 +1,8 @@
 #include <algorithm>
 
-#include "archive.hh"
-#include "store-api.hh"
-#include "worker-protocol.hh"
+#include "libstore/store-api.hh"
+#include "libstore/worker-protocol.hh"
+#include "libutil/archive.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/fs-accessor.hh b/third_party/nix/src/libstore/fs-accessor.hh
index ad0d7f0ed9fd..1bc1373dcb2f 100644
--- a/third_party/nix/src/libstore/fs-accessor.hh
+++ b/third_party/nix/src/libstore/fs-accessor.hh
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "types.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/gc.cc b/third_party/nix/src/libstore/gc.cc
index 5c1ea3d58b69..9a6d97eb73c9 100644
--- a/third_party/nix/src/libstore/gc.cc
+++ b/third_party/nix/src/libstore/gc.cc
@@ -9,16 +9,16 @@
 #include <absl/strings/match.h>
 #include <absl/strings/str_split.h>
 #include <fcntl.h>
+#include <glog/logging.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"
-#include "glog/logging.h"
-#include "local-store.hh"
+#include "libstore/derivations.hh"
+#include "libstore/globals.hh"
+#include "libstore/local-store.hh"
+#include "libutil/finally.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/globals.cc b/third_party/nix/src/libstore/globals.cc
index f218534cc9f8..dccf8d9815a7 100644
--- a/third_party/nix/src/libstore/globals.cc
+++ b/third_party/nix/src/libstore/globals.cc
@@ -1,4 +1,4 @@
-#include "globals.hh"
+#include "libstore/globals.hh"
 
 #include <algorithm>
 #include <map>
@@ -9,9 +9,10 @@
 #include <absl/strings/str_split.h>
 #include <dlfcn.h>
 
-#include "archive.hh"
-#include "args.hh"
-#include "util.hh"
+#include "libutil/archive.hh"
+#include "libutil/args.hh"
+#include "libutil/util.hh"
+#include "nix_config.h"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/globals.hh b/third_party/nix/src/libstore/globals.hh
index feff54879070..567ec6c42b6c 100644
--- a/third_party/nix/src/libstore/globals.hh
+++ b/third_party/nix/src/libstore/globals.hh
@@ -5,9 +5,10 @@
 
 #include <sys/types.h>
 
-#include "config.hh"
-#include "types.hh"
-#include "util.hh"
+#include "libutil/config.hh"
+#include "libutil/types.hh"
+#include "libutil/util.hh"
+#include "nix_config.h"
 
 namespace nix {
 
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 c75d5f2860a7..8ab07033b191 100644
--- a/third_party/nix/src/libstore/http-binary-cache-store.cc
+++ b/third_party/nix/src/libstore/http-binary-cache-store.cc
@@ -2,10 +2,10 @@
 
 #include <glog/logging.h>
 
-#include "binary-cache-store.hh"
-#include "download.hh"
-#include "globals.hh"
-#include "nar-info-disk-cache.hh"
+#include "libstore/binary-cache-store.hh"
+#include "libstore/download.hh"
+#include "libstore/globals.hh"
+#include "libstore/nar-info-disk-cache.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/legacy-ssh-store.cc b/third_party/nix/src/libstore/legacy-ssh-store.cc
index 9e6870f0da6b..332f6676b26e 100644
--- a/third_party/nix/src/libstore/legacy-ssh-store.cc
+++ b/third_party/nix/src/libstore/legacy-ssh-store.cc
@@ -1,12 +1,13 @@
-#include "archive.hh"
-#include "derivations.hh"
-#include "glog/logging.h"
-#include "pool.hh"
-#include "remote-store.hh"
-#include "serve-protocol.hh"
-#include "ssh.hh"
-#include "store-api.hh"
-#include "worker-protocol.hh"
+#include <glog/logging.h>
+
+#include "libstore/derivations.hh"
+#include "libstore/remote-store.hh"
+#include "libstore/serve-protocol.hh"
+#include "libstore/ssh.hh"
+#include "libstore/store-api.hh"
+#include "libstore/worker-protocol.hh"
+#include "libutil/archive.hh"
+#include "libutil/pool.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/local-binary-cache-store.cc b/third_party/nix/src/libstore/local-binary-cache-store.cc
index 88dd19a32069..4555de504783 100644
--- a/third_party/nix/src/libstore/local-binary-cache-store.cc
+++ b/third_party/nix/src/libstore/local-binary-cache-store.cc
@@ -2,9 +2,9 @@
 
 #include <absl/strings/match.h>
 
-#include "binary-cache-store.hh"
-#include "globals.hh"
-#include "nar-info-disk-cache.hh"
+#include "libstore/binary-cache-store.hh"
+#include "libstore/globals.hh"
+#include "libstore/nar-info-disk-cache.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/local-fs-store.cc b/third_party/nix/src/libstore/local-fs-store.cc
index f11c84b182a6..2dd09093d5f8 100644
--- a/third_party/nix/src/libstore/local-fs-store.cc
+++ b/third_party/nix/src/libstore/local-fs-store.cc
@@ -1,9 +1,9 @@
-#include "archive.hh"
-#include "compression.hh"
-#include "derivations.hh"
-#include "fs-accessor.hh"
-#include "globals.hh"
-#include "store-api.hh"
+#include "libstore/derivations.hh"
+#include "libstore/fs-accessor.hh"
+#include "libstore/globals.hh"
+#include "libstore/store-api.hh"
+#include "libutil/archive.hh"
+#include "libutil/compression.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/local-store.cc b/third_party/nix/src/libstore/local-store.cc
index ebc912969423..f9d03c520a7c 100644
--- a/third_party/nix/src/libstore/local-store.cc
+++ b/third_party/nix/src/libstore/local-store.cc
@@ -1,4 +1,4 @@
-#include "local-store.hh"
+#include "libstore/local-store.hh"
 
 #include <algorithm>
 #include <cerrno>
@@ -25,12 +25,13 @@
 #include <unistd.h>
 #include <utime.h>
 
-#include "archive.hh"
-#include "derivations.hh"
-#include "globals.hh"
-#include "nar-info.hh"
-#include "pathlocks.hh"
-#include "worker-protocol.hh"
+#include "generated/schema.sql.hh"
+#include "libstore/derivations.hh"
+#include "libstore/globals.hh"
+#include "libstore/nar-info.hh"
+#include "libstore/pathlocks.hh"
+#include "libstore/worker-protocol.hh"
+#include "libutil/archive.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/local-store.hh b/third_party/nix/src/libstore/local-store.hh
index 178cadf92bf6..7ad9de3a8a3e 100644
--- a/third_party/nix/src/libstore/local-store.hh
+++ b/third_party/nix/src/libstore/local-store.hh
@@ -7,11 +7,11 @@
 
 #include <absl/strings/str_split.h>
 
-#include "pathlocks.hh"
-#include "sqlite.hh"
-#include "store-api.hh"
-#include "sync.hh"
-#include "util.hh"
+#include "libstore/pathlocks.hh"
+#include "libstore/sqlite.hh"
+#include "libstore/store-api.hh"
+#include "libutil/sync.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/machines.cc b/third_party/nix/src/libstore/machines.cc
index 9ad20a25f8f0..e5d22c534c36 100644
--- a/third_party/nix/src/libstore/machines.cc
+++ b/third_party/nix/src/libstore/machines.cc
@@ -1,4 +1,4 @@
-#include "machines.hh"
+#include "libstore/machines.hh"
 
 #include <algorithm>
 
@@ -8,8 +8,8 @@
 #include <absl/strings/string_view.h>
 #include <glog/logging.h>
 
-#include "globals.hh"
-#include "util.hh"
+#include "libstore/globals.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/machines.hh b/third_party/nix/src/libstore/machines.hh
index 23712e676056..0e7269723707 100644
--- a/third_party/nix/src/libstore/machines.hh
+++ b/third_party/nix/src/libstore/machines.hh
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "types.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/misc.cc b/third_party/nix/src/libstore/misc.cc
index f95c4bec8b0c..8a05d55accd0 100644
--- a/third_party/nix/src/libstore/misc.cc
+++ b/third_party/nix/src/libstore/misc.cc
@@ -1,11 +1,11 @@
 #include <glog/logging.h>
 
-#include "derivations.hh"
-#include "globals.hh"
-#include "local-store.hh"
-#include "parsed-derivations.hh"
-#include "store-api.hh"
-#include "thread-pool.hh"
+#include "libstore/derivations.hh"
+#include "libstore/globals.hh"
+#include "libstore/local-store.hh"
+#include "libstore/parsed-derivations.hh"
+#include "libstore/store-api.hh"
+#include "libutil/thread-pool.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/nar-accessor.cc b/third_party/nix/src/libstore/nar-accessor.cc
index 84bfb531ecd6..49fa1bd1d61c 100644
--- a/third_party/nix/src/libstore/nar-accessor.cc
+++ b/third_party/nix/src/libstore/nar-accessor.cc
@@ -1,4 +1,4 @@
-#include "nar-accessor.hh"
+#include "libstore/nar-accessor.hh"
 
 #include <algorithm>
 #include <map>
@@ -6,8 +6,8 @@
 #include <stack>
 #include <utility>
 
-#include "archive.hh"
-#include "json.hh"
+#include "libutil/archive.hh"
+#include "libutil/json.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/nar-accessor.hh b/third_party/nix/src/libstore/nar-accessor.hh
index 8b18d4a36e06..0906a4606eb4 100644
--- a/third_party/nix/src/libstore/nar-accessor.hh
+++ b/third_party/nix/src/libstore/nar-accessor.hh
@@ -2,7 +2,7 @@
 
 #include <functional>
 
-#include "fs-accessor.hh"
+#include "libstore/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 0a7a0dc22c51..c98882bff319 100644
--- a/third_party/nix/src/libstore/nar-info-disk-cache.cc
+++ b/third_party/nix/src/libstore/nar-info-disk-cache.cc
@@ -1,13 +1,13 @@
-#include "nar-info-disk-cache.hh"
+#include "libstore/nar-info-disk-cache.hh"
 
 #include <absl/strings/str_cat.h>
 #include <absl/strings/str_split.h>
 #include <glog/logging.h>
 #include <sqlite3.h>
 
-#include "globals.hh"
-#include "sqlite.hh"
-#include "sync.hh"
+#include "libstore/globals.hh"
+#include "libstore/sqlite.hh"
+#include "libutil/sync.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/nar-info-disk-cache.hh b/third_party/nix/src/libstore/nar-info-disk-cache.hh
index 65bb773c92f7..b4107721aad1 100644
--- a/third_party/nix/src/libstore/nar-info-disk-cache.hh
+++ b/third_party/nix/src/libstore/nar-info-disk-cache.hh
@@ -1,7 +1,7 @@
 #pragma once
 
-#include "nar-info.hh"
-#include "ref.hh"
+#include "libstore/nar-info.hh"
+#include "libutil/ref.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/nar-info.cc b/third_party/nix/src/libstore/nar-info.cc
index 1dc0b54cf1e6..aa764f4a16a0 100644
--- a/third_party/nix/src/libstore/nar-info.cc
+++ b/third_party/nix/src/libstore/nar-info.cc
@@ -1,9 +1,9 @@
-#include "nar-info.hh"
+#include "libstore/nar-info.hh"
 
 #include <absl/strings/numbers.h>
 #include <absl/strings/str_split.h>
 
-#include "globals.hh"
+#include "libstore/globals.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/nar-info.hh b/third_party/nix/src/libstore/nar-info.hh
index ce362e703f99..48eccf830270 100644
--- a/third_party/nix/src/libstore/nar-info.hh
+++ b/third_party/nix/src/libstore/nar-info.hh
@@ -1,8 +1,8 @@
 #pragma once
 
-#include "hash.hh"
-#include "store-api.hh"
-#include "types.hh"
+#include "libstore/store-api.hh"
+#include "libutil/hash.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/optimise-store.cc b/third_party/nix/src/libstore/optimise-store.cc
index 7217d54ca9af..eb24633c181c 100644
--- a/third_party/nix/src/libstore/optimise-store.cc
+++ b/third_party/nix/src/libstore/optimise-store.cc
@@ -5,14 +5,14 @@
 #include <regex>
 #include <utility>
 
+#include <glog/logging.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "globals.hh"
-#include "glog/logging.h"
-#include "local-store.hh"
-#include "util.hh"
+#include "libstore/globals.hh"
+#include "libstore/local-store.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/parsed-derivations.cc b/third_party/nix/src/libstore/parsed-derivations.cc
index 571f49ad59e2..9ee93b6a6d6e 100644
--- a/third_party/nix/src/libstore/parsed-derivations.cc
+++ b/third_party/nix/src/libstore/parsed-derivations.cc
@@ -1,4 +1,4 @@
-#include "parsed-derivations.hh"
+#include "libstore/parsed-derivations.hh"
 
 #include <absl/strings/str_split.h>
 
diff --git a/third_party/nix/src/libstore/parsed-derivations.hh b/third_party/nix/src/libstore/parsed-derivations.hh
index 7b2da3b566ac..7cd3d36f67bf 100644
--- a/third_party/nix/src/libstore/parsed-derivations.hh
+++ b/third_party/nix/src/libstore/parsed-derivations.hh
@@ -1,6 +1,6 @@
 #include <nlohmann/json.hpp>
 
-#include "derivations.hh"
+#include "libstore/derivations.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/pathlocks.cc b/third_party/nix/src/libstore/pathlocks.cc
index 642e64a62bac..4b153856d283 100644
--- a/third_party/nix/src/libstore/pathlocks.cc
+++ b/third_party/nix/src/libstore/pathlocks.cc
@@ -1,4 +1,4 @@
-#include "pathlocks.hh"
+#include "libstore/pathlocks.hh"
 
 #include <cerrno>
 #include <cstdlib>
@@ -9,8 +9,8 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
-#include "sync.hh"
-#include "util.hh"
+#include "libutil/sync.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/pathlocks.hh b/third_party/nix/src/libstore/pathlocks.hh
index 201e3f01b4df..d515963e76e9 100644
--- a/third_party/nix/src/libstore/pathlocks.hh
+++ b/third_party/nix/src/libstore/pathlocks.hh
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "util.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/profiles.cc b/third_party/nix/src/libstore/profiles.cc
index 53e64879954b..0d44c60cc4e9 100644
--- a/third_party/nix/src/libstore/profiles.cc
+++ b/third_party/nix/src/libstore/profiles.cc
@@ -1,4 +1,4 @@
-#include "profiles.hh"
+#include "libstore/profiles.hh"
 
 #include <cerrno>
 #include <cstdio>
@@ -11,8 +11,8 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "store-api.hh"
-#include "util.hh"
+#include "libstore/store-api.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/profiles.hh b/third_party/nix/src/libstore/profiles.hh
index 9f31083b32ee..ff6399040928 100644
--- a/third_party/nix/src/libstore/profiles.hh
+++ b/third_party/nix/src/libstore/profiles.hh
@@ -2,8 +2,8 @@
 
 #include <time.h>
 
-#include "pathlocks.hh"
-#include "types.hh"
+#include "libstore/pathlocks.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/references.cc b/third_party/nix/src/libstore/references.cc
index 6b9b7137c4e5..ea9ce44275a0 100644
--- a/third_party/nix/src/libstore/references.cc
+++ b/third_party/nix/src/libstore/references.cc
@@ -1,13 +1,13 @@
-#include "references.hh"
+#include "libstore/references.hh"
 
 #include <cstdlib>
 #include <map>
 
 #include <glog/logging.h>
 
-#include "archive.hh"
-#include "hash.hh"
-#include "util.hh"
+#include "libutil/archive.hh"
+#include "libutil/hash.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/references.hh b/third_party/nix/src/libstore/references.hh
index 2229150e3359..94ac5200bdff 100644
--- a/third_party/nix/src/libstore/references.hh
+++ b/third_party/nix/src/libstore/references.hh
@@ -1,7 +1,7 @@
 #pragma once
 
-#include "hash.hh"
-#include "types.hh"
+#include "libutil/hash.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/remote-fs-accessor.cc b/third_party/nix/src/libstore/remote-fs-accessor.cc
index ca478c213fde..2917f01f7939 100644
--- a/third_party/nix/src/libstore/remote-fs-accessor.cc
+++ b/third_party/nix/src/libstore/remote-fs-accessor.cc
@@ -1,11 +1,11 @@
-#include "remote-fs-accessor.hh"
+#include "libstore/remote-fs-accessor.hh"
 
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 
-#include "json.hh"
-#include "nar-accessor.hh"
+#include "libstore/nar-accessor.hh"
+#include "libutil/json.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/remote-fs-accessor.hh b/third_party/nix/src/libstore/remote-fs-accessor.hh
index 32c729f50dcf..c4f6e89c97b5 100644
--- a/third_party/nix/src/libstore/remote-fs-accessor.hh
+++ b/third_party/nix/src/libstore/remote-fs-accessor.hh
@@ -1,8 +1,8 @@
 #pragma once
 
-#include "fs-accessor.hh"
-#include "ref.hh"
-#include "store-api.hh"
+#include "libstore/fs-accessor.hh"
+#include "libstore/store-api.hh"
+#include "libutil/ref.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/remote-store.cc b/third_party/nix/src/libstore/remote-store.cc
index c5d1dac6cb6c..5c5038dc4154 100644
--- a/third_party/nix/src/libstore/remote-store.cc
+++ b/third_party/nix/src/libstore/remote-store.cc
@@ -1,4 +1,4 @@
-#include "remote-store.hh"
+#include "libstore/remote-store.hh"
 
 #include <cerrno>
 #include <cstring>
@@ -12,16 +12,16 @@
 #include <sys/un.h>
 #include <unistd.h>
 
-#include "affinity.hh"
-#include "archive.hh"
-#include "derivations.hh"
-#include "finally.hh"
-#include "globals.hh"
-#include "pool.hh"
-#include "prefork-compat.hh"
-#include "serialise.hh"
-#include "util.hh"
-#include "worker-protocol.hh"
+#include "libstore/derivations.hh"
+#include "libstore/globals.hh"
+#include "libstore/worker-protocol.hh"
+#include "libutil/affinity.hh"
+#include "libutil/archive.hh"
+#include "libutil/finally.hh"
+#include "libutil/pool.hh"
+#include "libutil/prefork-compat.hh"
+#include "libutil/serialise.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/remote-store.hh b/third_party/nix/src/libstore/remote-store.hh
index e61e72892c34..03fbbf000c5f 100644
--- a/third_party/nix/src/libstore/remote-store.hh
+++ b/third_party/nix/src/libstore/remote-store.hh
@@ -3,7 +3,7 @@
 #include <limits>
 #include <string>
 
-#include "store-api.hh"
+#include "libstore/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 d713c5ce0151..0c13039b52d4 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,6 @@
 #if ENABLE_S3
 
-#include "s3-binary-cache-store.hh"
+#include "libstore/s3-binary-cache-store.hh"
 
 #include <absl/strings/ascii.h>
 #include <absl/strings/match.h>
@@ -20,13 +20,13 @@
 #include <aws/s3/model/PutObjectRequest.h>
 #include <aws/transfer/TransferManager.h>
 
-#include "compression.hh"
-#include "download.hh"
-#include "globals.hh"
-#include "istringstream_nocopy.hh"
-#include "nar-info-disk-cache.hh"
-#include "nar-info.hh"
-#include "s3.hh"
+#include "libstore/download.hh"
+#include "libstore/globals.hh"
+#include "libstore/nar-info-disk-cache.hh"
+#include "libstore/nar-info.hh"
+#include "libstore/s3.hh"
+#include "libutil/compression.hh"
+#include "libutil/istringstream_nocopy.hh"
 
 using namespace Aws::Transfer;
 
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 24cb67721a92..3d0d0b3c4496 100644
--- a/third_party/nix/src/libstore/s3-binary-cache-store.hh
+++ b/third_party/nix/src/libstore/s3-binary-cache-store.hh
@@ -2,7 +2,7 @@
 
 #include <atomic>
 
-#include "binary-cache-store.hh"
+#include "libstore/binary-cache-store.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/s3.hh b/third_party/nix/src/libstore/s3.hh
index 09935fabed47..4f1852dc3d72 100644
--- a/third_party/nix/src/libstore/s3.hh
+++ b/third_party/nix/src/libstore/s3.hh
@@ -2,7 +2,7 @@
 
 #if ENABLE_S3
 
-#include "ref.hh"
+#include "libutil/ref.hh"
 
 namespace Aws {
 namespace Client {
diff --git a/third_party/nix/src/libstore/sqlite.cc b/third_party/nix/src/libstore/sqlite.cc
index dbdaa29d4fd9..b6ecfce924a1 100644
--- a/third_party/nix/src/libstore/sqlite.cc
+++ b/third_party/nix/src/libstore/sqlite.cc
@@ -1,11 +1,11 @@
-#include "sqlite.hh"
+#include "libstore/sqlite.hh"
 
 #include <atomic>
 
 #include <glog/logging.h>
 #include <sqlite3.h>
 
-#include "util.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/sqlite.hh b/third_party/nix/src/libstore/sqlite.hh
index 298bb574ea2d..c0bc70bfc16d 100644
--- a/third_party/nix/src/libstore/sqlite.hh
+++ b/third_party/nix/src/libstore/sqlite.hh
@@ -3,7 +3,7 @@
 #include <functional>
 #include <string>
 
-#include "types.hh"
+#include "libutil/types.hh"
 
 class sqlite3;
 class sqlite3_stmt;
diff --git a/third_party/nix/src/libstore/ssh-store.cc b/third_party/nix/src/libstore/ssh-store.cc
index 9c49babcf2b2..eae8ee888bb9 100644
--- a/third_party/nix/src/libstore/ssh-store.cc
+++ b/third_party/nix/src/libstore/ssh-store.cc
@@ -1,10 +1,10 @@
-#include "archive.hh"
-#include "pool.hh"
-#include "remote-fs-accessor.hh"
-#include "remote-store.hh"
-#include "ssh.hh"
-#include "store-api.hh"
-#include "worker-protocol.hh"
+#include "libstore/remote-fs-accessor.hh"
+#include "libstore/remote-store.hh"
+#include "libstore/ssh.hh"
+#include "libstore/store-api.hh"
+#include "libstore/worker-protocol.hh"
+#include "libutil/archive.hh"
+#include "libutil/pool.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/ssh.cc b/third_party/nix/src/libstore/ssh.cc
index 1b09eb42c6b9..e84944c4c9cd 100644
--- a/third_party/nix/src/libstore/ssh.cc
+++ b/third_party/nix/src/libstore/ssh.cc
@@ -1,4 +1,4 @@
-#include "ssh.hh"
+#include "libstore/ssh.hh"
 
 #include <utility>
 
diff --git a/third_party/nix/src/libstore/ssh.hh b/third_party/nix/src/libstore/ssh.hh
index 23952ccb1293..9844f89d3599 100644
--- a/third_party/nix/src/libstore/ssh.hh
+++ b/third_party/nix/src/libstore/ssh.hh
@@ -1,7 +1,7 @@
 #pragma once
 
-#include "sync.hh"
-#include "util.hh"
+#include "libutil/sync.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/store-api.cc b/third_party/nix/src/libstore/store-api.cc
index afdbc14e29a3..081cdea9873d 100644
--- a/third_party/nix/src/libstore/store-api.cc
+++ b/third_party/nix/src/libstore/store-api.cc
@@ -1,4 +1,4 @@
-#include "store-api.hh"
+#include "libstore/store-api.hh"
 
 #include <future>
 #include <utility>
@@ -8,13 +8,13 @@
 #include <absl/strings/str_split.h>
 #include <glog/logging.h>
 
-#include "crypto.hh"
-#include "derivations.hh"
-#include "globals.hh"
-#include "json.hh"
-#include "nar-info-disk-cache.hh"
-#include "thread-pool.hh"
-#include "util.hh"
+#include "libstore/crypto.hh"
+#include "libstore/derivations.hh"
+#include "libstore/globals.hh"
+#include "libstore/nar-info-disk-cache.hh"
+#include "libutil/json.hh"
+#include "libutil/thread-pool.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
@@ -844,8 +844,8 @@ void Store::addToStore(const ValidPathInfo& info, const ref<std::string>& nar,
 
 }  // namespace nix
 
-#include "local-store.hh"
-#include "remote-store.hh"
+#include "libstore/local-store.hh"
+#include "libstore/remote-store.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libstore/store-api.hh b/third_party/nix/src/libstore/store-api.hh
index cf2520c6ca98..c6f8d75b67e2 100644
--- a/third_party/nix/src/libstore/store-api.hh
+++ b/third_party/nix/src/libstore/store-api.hh
@@ -8,13 +8,13 @@
 #include <unordered_map>
 #include <unordered_set>
 
-#include "config.hh"
-#include "crypto.hh"
-#include "globals.hh"
-#include "hash.hh"
-#include "lru-cache.hh"
-#include "serialise.hh"
-#include "sync.hh"
+#include "libstore/crypto.hh"
+#include "libstore/globals.hh"
+#include "libutil/config.hh"
+#include "libutil/hash.hh"
+#include "libutil/lru-cache.hh"
+#include "libutil/serialise.hh"
+#include "libutil/sync.hh"
 
 namespace nix {