aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2023-02-01 16:00:28 +0100
committerGitHub <noreply@github.com>2023-02-01 16:00:28 +0100
commit518da6c6a30881bd0e767a84c8193a198eeed230 (patch)
treec9a8b7014d17961f871dabfa6b60c108c8531461 /src/libstore
parentb55a946d8d67bd8cdef6f35283c359b4d49e25b0 (diff)
parent02e745ba5b3dca3b53d88a49d86f5b22d047a08d (diff)
Merge pull request #7716 from obsidiansystems/small-storePath-cleanups
Separate `path.hh` from `content-address.hh`
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/path.hh5
-rw-r--r--src/libstore/realisation.hh3
-rw-r--r--src/libstore/store-api.hh2
3 files changed, 7 insertions, 3 deletions
diff --git a/src/libstore/path.hh b/src/libstore/path.hh
index 6a8f027f9..1e5579b90 100644
--- a/src/libstore/path.hh
+++ b/src/libstore/path.hh
@@ -1,6 +1,7 @@
#pragma once
-#include "content-address.hh"
+#include <string_view>
+
#include "types.hh"
namespace nix {
@@ -66,8 +67,6 @@ public:
typedef std::set<StorePath> StorePathSet;
typedef std::vector<StorePath> StorePaths;
-typedef std::map<StorePath, std::optional<ContentAddress>> StorePathCAMap;
-
/* Extension of derivations in the Nix store. */
const std::string drvExtension = ".drv";
diff --git a/src/libstore/realisation.hh b/src/libstore/realisation.hh
index 62561fce3..48d0283de 100644
--- a/src/libstore/realisation.hh
+++ b/src/libstore/realisation.hh
@@ -1,5 +1,8 @@
#pragma once
+#include <variant>
+
+#include "hash.hh"
#include "path.hh"
#include <nlohmann/json_fwd.hpp>
#include "comparator.hh"
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 5807392a7..4d8db3596 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -87,6 +87,8 @@ enum BuildMode { bmNormal, bmRepair, bmCheck };
struct BuildResult;
+typedef std::map<StorePath, std::optional<ContentAddress>> StorePathCAMap;
+
struct StoreConfig : public Config
{
using Config::Config;