1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 11:21:47 +02:00

Move hash into SourceInfo and rename to narHash to avoid ambiguity

This commit is contained in:
Eelco Dolstra 2019-05-28 13:07:15 +02:00
parent 6d7efcfaeb
commit 894e007445
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 8 additions and 10 deletions

View file

@ -84,7 +84,7 @@ struct SourceInfo
FlakeRef resolvedRef;
Path storePath;
std::optional<uint64_t> revCount;
// date
Hash narHash; // store path hash
SourceInfo(const FlakeRef & resolvRef) : resolvedRef(resolvRef) {};
};
@ -95,7 +95,6 @@ struct Flake
FlakeRef resolvedRef;
std::string description;
SourceInfo sourceInfo;
Hash hash; // content hash
std::vector<FlakeRef> requires;
std::map<FlakeAlias, FlakeRef> nonFlakeRequires;
Value * vProvides; // FIXME: gc
@ -111,7 +110,6 @@ struct NonFlake
FlakeRef originalRef;
FlakeRef resolvedRef;
SourceInfo sourceInfo;
Hash hash;
NonFlake(const FlakeRef & origRef, const SourceInfo & sourceInfo) :
originalRef(origRef), resolvedRef(sourceInfo.resolvedRef), sourceInfo(sourceInfo) {};
};