diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-04-16 15:40:58 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-04-16 15:43:55 +0200 |
commit | 3d0e81051fca850fb7b46d6299a94566b8c1ab62 (patch) | |
tree | 87c89c1882875cfbabdad36fbaa97257deee8bdb /src/libexpr/primops/flake.hh | |
parent | 8c4e759efd779e80d135516fdce2cf884a2e06f5 (diff) |
Fix lock file generation
Before:
"requires": {
"nixpkgs": {
"uri": "nixpkgs"
}
},
After:
"requires": {
"nixpkgs": {
"uri": "github:edolstra/nixpkgs/f10e8a02eb7fa2b4a070f30cf87f4efcc7f3186d"
}
},
Diffstat (limited to 'src/libexpr/primops/flake.hh')
-rw-r--r-- | src/libexpr/primops/flake.hh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/libexpr/primops/flake.hh b/src/libexpr/primops/flake.hh index 655d87f03..f93796660 100644 --- a/src/libexpr/primops/flake.hh +++ b/src/libexpr/primops/flake.hh @@ -37,20 +37,28 @@ std::shared_ptr<FlakeRegistry> readRegistry(const Path &); void writeRegistry(const FlakeRegistry &, const Path &); +struct FlakeSourceInfo +{ + FlakeRef flakeRef; + Path storePath; + std::optional<Hash> rev; + std::optional<uint64_t> revCount; + // date + FlakeSourceInfo(const FlakeRef & flakeRef) : flakeRef(flakeRef) { } +}; + struct Flake { FlakeId id; FlakeRef ref; std::string description; - Path path; - std::optional<uint64_t> revCount; + FlakeSourceInfo sourceInfo; std::vector<FlakeRef> requires; LockFile lockFile; std::map<FlakeAlias, FlakeRef> nonFlakeRequires; Value * vProvides; // FIXME: gc - // date - // content hash - Flake(const FlakeRef flakeRef) : ref(flakeRef) {}; + Flake(const FlakeRef & flakeRef, FlakeSourceInfo && sourceInfo) + : ref(flakeRef), sourceInfo(sourceInfo) {}; }; struct NonFlake |