aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/tree-info.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-07 11:20:24 +0200
committerGitHub <noreply@github.com>2020-04-07 11:20:24 +0200
commitf32a9b354dd96c263c87e7d470206ee43c2efd67 (patch)
treee3526dd4f3a4cb0e66cbd5a307d6fe02a76fad8e /src/libfetchers/tree-info.cc
parentebb20a5356af023498506324bd0f88a99175e295 (diff)
parentcd39709003eee4b85a31799b8bc2de59721930ce (diff)
Merge pull request #3459 from NixOS/fetchers
Backport libfetchers from the flakes branch
Diffstat (limited to 'src/libfetchers/tree-info.cc')
-rw-r--r--src/libfetchers/tree-info.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libfetchers/tree-info.cc b/src/libfetchers/tree-info.cc
new file mode 100644
index 000000000..5788e94a1
--- /dev/null
+++ b/src/libfetchers/tree-info.cc
@@ -0,0 +1,14 @@
+#include "tree-info.hh"
+#include "store-api.hh"
+
+#include <nlohmann/json.hpp>
+
+namespace nix::fetchers {
+
+StorePath TreeInfo::computeStorePath(Store & store) const
+{
+ assert(narHash);
+ return store.makeFixedOutputPath(true, narHash, "source");
+}
+
+}