aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/fetch-to-store.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers/fetch-to-store.hh')
-rw-r--r--src/libfetchers/fetch-to-store.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libfetchers/fetch-to-store.hh b/src/libfetchers/fetch-to-store.hh
new file mode 100644
index 000000000..eef269071
--- /dev/null
+++ b/src/libfetchers/fetch-to-store.hh
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "source-path.hh"
+#include "store-api.hh"
+#include "util.hh"
+#include "repair-flag.hh"
+#include "content-address.hh"
+
+namespace nix {
+
+/**
+ * Copy the `path` to the Nix store.
+ */
+StorePath fetchToStore(
+ Store & store,
+ const SourcePath & path,
+ std::string_view name = "source",
+ FileIngestionMethod method = FileIngestionMethod::Recursive,
+ PathFilter * filter = nullptr,
+ RepairFlag repair = NoRepair);
+
+}