Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nar-info.hh
Go to the documentation of this file.
1#pragma once
3
5#include "lix/libutil/hash.hh"
7
8namespace nix {
9
10class Store;
11
12struct NarInfo : ValidPathInfo
13{
14 std::string url;
15 std::string compression;
16 std::optional<Hash> fileHash;
17 uint64_t fileSize = 0;
18
19 NarInfo() = delete;
20 NarInfo(const Store & store, std::string && name, ContentAddressWithReferences && ca, Hash narHash)
21 : ValidPathInfo(store, std::move(name), std::move(ca), narHash)
22 { }
23 NarInfo(StorePath && path, Hash narHash) : ValidPathInfo(std::move(path), narHash) { }
24 NarInfo(const ValidPathInfo & info) : ValidPathInfo(info) { }
25 NarInfo(const Store & store, const std::string_view & s, const std::string_view & whence);
26
27 std::string to_string(const Store & store) const;
28};
29
30}
Definition path.hh:21
Definition store-api.hh:195
Definition content-address.hh:242
Definition hash.hh:41
std::optional< ContentAddress > ca
Definition path-info.hh:72
Hash narHash
Definition path-info.hh:41