Upgrade downstreamPlaceholder to a type with methods

This gets us ready for dynamic derivation dependencies (part of RFC 92).
This commit is contained in:
John Ericson
2023-05-17 17:41:16 -04:00
parent e7c1113a37
commit b9e5ce4a27
10 changed files with 152 additions and 30 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
#include "names.hh"
#include "command.hh"
#include "derivations.hh"
#include "downstream-placeholder.hh"
namespace nix {
@@ -23,7 +24,7 @@ StringPairs resolveRewrites(
if (auto drvDep = std::get_if<BuiltPathBuilt>(&dep.path))
for (auto & [ outputName, outputPath ] : drvDep->outputs)
res.emplace(
downstreamPlaceholder(store, drvDep->drvPath, outputName),
DownstreamPlaceholder::unknownCaOutput(drvDep->drvPath, outputName).render(),
store.printStorePath(outputPath)
);
return res;