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

Merge remote-tracking branch 'upstream/master' into path-info

This commit is contained in:
John Ericson 2020-08-04 23:16:18 +00:00
commit 36dd7920a2
14 changed files with 69 additions and 55 deletions

View file

@ -1,17 +1,9 @@
#pragma once
// TODO many of thes eare not needed.
#include "path.hh"
#include "hash.hh"
#include "content-address.hh"
#include "serialise.hh"
#include "crypto.hh"
#include "lru-cache.hh"
#include "sync.hh"
#include "globals.hh"
#include "config.hh"
#include <limits>
#include <string>
#include <optional>
@ -61,6 +53,16 @@ void PathReferences<Ref>::setReferencesPossiblyToSelf(const Ref & self, std::set
references = refs;
}
struct SubstitutablePathInfo : PathReferences<StorePath>
{
std::optional<StorePath> deriver;
uint64_t downloadSize; /* 0 = unknown or inapplicable */
uint64_t narSize; /* 0 = unknown */
};
typedef std::map<StorePath, SubstitutablePathInfo> SubstitutablePathInfos;
struct ValidPathInfo : PathReferences<StorePath>
{
StorePath path;
@ -145,13 +147,4 @@ struct ValidPathInfo : PathReferences<StorePath>
typedef list<ValidPathInfo> ValidPathInfos;
struct SubstitutablePathInfo : PathReferences<StorePath>
{
std::optional<StorePath> deriver;
uint64_t downloadSize; /* 0 = unknown or inapplicable */
uint64_t narSize; /* 0 = unknown */
};
typedef std::map<StorePath, SubstitutablePathInfo> SubstitutablePathInfos;
}