1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 05:01:48 +02:00

Add TreeInfo::computeStorePath()

This commit is contained in:
Eelco Dolstra 2020-02-02 12:29:53 +01:00
parent 7bcc9f2aaf
commit fad9faf354
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 16 additions and 3 deletions

View file

@ -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");
}
}

View file

@ -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;
};
}