aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installable-value.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-06 05:24:35 +0100
committereldritch horrors <pennae@lix.systems>2024-03-05 23:46:18 -0700
commit89e99d94e4ae492db09c0ebc0c35e4890ef7db25 (patch)
treeeab2defee911a6c0e39d4b073062690bd9a3a058 /src/libcmd/installable-value.cc
parente9b5929b22116cb714adfe88ba39a817e89b019c (diff)
Merge pull request #9634 from 9999years/combine-abstract-pos-and-pos
Combine `AbstractPos`, `PosAdapter`, and `Pos` (cherry picked from commit 113499d16fc87d53b73fb62fe6242154909756ed) === this is a bit cursed because originally it was based on InputAccessor code that we don't have and moved/patched features we likewise don't have (fetchToStore caching, all the individual accessors, ContentAddressMethod). the commit is adjusted accordingly to match (remove caching, ignore accessors, use FileIngestionMethod). note that `state.rootPath . CanonPath == abs` and computeStorePathForPath works relative to cwd, so the slight rewrite in the moved fetchToStore is legal. Change-Id: I05fd340c273f0bcc8ffabfebdc4a88b98083bce5
Diffstat (limited to 'src/libcmd/installable-value.cc')
-rw-r--r--src/libcmd/installable-value.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcmd/installable-value.cc b/src/libcmd/installable-value.cc
index 08ad35105..c8a3e1b21 100644
--- a/src/libcmd/installable-value.cc
+++ b/src/libcmd/installable-value.cc
@@ -1,5 +1,6 @@
#include "installable-value.hh"
#include "eval-cache.hh"
+#include "fetch-to-store.hh"
namespace nix {
@@ -44,7 +45,7 @@ ref<InstallableValue> InstallableValue::require(ref<Installable> installable)
std::optional<DerivedPathWithInfo> InstallableValue::trySinglePathToDerivedPaths(Value & v, const PosIdx pos, std::string_view errorCtx)
{
if (v.type() == nPath) {
- auto storePath = v.path().fetchToStore(state->store);
+ auto storePath = fetchToStore(*state->store, v.path());
return {{
.path = DerivedPath::Opaque {
.path = std::move(storePath),