mirror of
https://github.com/NixOS/nix.git
synced 2025-12-01 14:41:00 +01:00
parent
f9d72855ae
commit
83615fcf8f
4 changed files with 16 additions and 5 deletions
|
|
@ -200,12 +200,17 @@ void Input::markChangedFile(
|
|||
return scheme->markChangedFile(*this, file, commitMsg);
|
||||
}
|
||||
|
||||
std::string Input::getName() const
|
||||
{
|
||||
return maybeGetStrAttr(attrs, "name").value_or("source");
|
||||
}
|
||||
|
||||
StorePath Input::computeStorePath(Store & store) const
|
||||
{
|
||||
auto narHash = getNarHash();
|
||||
if (!narHash)
|
||||
throw Error("cannot compute store path for mutable input '%s'", to_string());
|
||||
return store.makeFixedOutputPath(FileIngestionMethod::Recursive, *narHash, "source");
|
||||
return store.makeFixedOutputPath(FileIngestionMethod::Recursive, *narHash, getName());
|
||||
}
|
||||
|
||||
std::string Input::getType() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue