mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Add TreeInfo::computeStorePath()
This commit is contained in:
parent
7bcc9f2aaf
commit
fad9faf354
4 changed files with 16 additions and 3 deletions
|
@ -111,8 +111,7 @@ nlohmann::json LockedInput::toJson() const
|
|||
|
||||
StorePath LockedInput::computeStorePath(Store & store) const
|
||||
{
|
||||
assert(info.narHash);
|
||||
return store.makeFixedOutputPath(true, info.narHash, "source");
|
||||
return info.computeStorePath(store);
|
||||
}
|
||||
|
||||
LockedInputs::LockedInputs(const nlohmann::json & json)
|
||||
|
|
|
@ -11,6 +11,8 @@ struct StorePath;
|
|||
|
||||
namespace nix::flake {
|
||||
|
||||
using namespace fetchers;
|
||||
|
||||
typedef std::vector<FlakeId> InputPath;
|
||||
|
||||
struct LockedInput;
|
||||
|
|
|
@ -107,4 +107,10 @@ std::shared_ptr<const Input> Input::applyOverrides(
|
|||
return shared_from_this();
|
||||
}
|
||||
|
||||
StorePath TreeInfo::computeStorePath(Store & store) const
|
||||
{
|
||||
assert(narHash);
|
||||
return store.makeFixedOutputPath(true, narHash, "source");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
namespace nix {
|
||||
#include "path.hh"
|
||||
|
||||
namespace nix { class Store; }
|
||||
|
||||
namespace nix::fetchers {
|
||||
|
||||
struct TreeInfo
|
||||
{
|
||||
|
@ -15,6 +19,8 @@ struct TreeInfo
|
|||
&& revCount == other.revCount
|
||||
&& lastModified == other.lastModified;
|
||||
}
|
||||
|
||||
StorePath computeStorePath(Store & store) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue