Nix
2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
registry.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
lix/libutil/types.hh
"
5
#include "
lix/libfetchers/fetchers.hh
"
6
7
namespace
nix {
class
Store
; }
8
9
namespace
nix::fetchers {
10
11
struct
Registry
12
{
13
enum
RegistryType {
14
Flag = 0,
15
User = 1,
16
System = 2,
17
Global = 3,
18
Custom = 4,
19
};
20
21
RegistryType type;
22
23
struct
Entry
24
{
25
Input
from, to;
26
Attrs extraAttrs;
27
bool
exact =
false
;
28
};
29
30
std::vector<Entry> entries;
31
32
Registry(RegistryType type)
33
: type(type)
34
{ }
35
36
static
std::shared_ptr<Registry> read(
37
const
Path
& path, RegistryType type);
38
39
void
write(
const
Path
& path);
40
41
void
add(
42
const
Input
& from,
43
const
Input
& to,
44
const
Attrs & extraAttrs);
45
46
void
remove(
const
Input
& input);
47
};
48
49
typedef
std::vector<std::shared_ptr<Registry>> Registries;
50
51
std::shared_ptr<Registry> getUserRegistry();
52
53
std::shared_ptr<Registry> getCustomRegistry(
const
Path
& p);
54
55
Path
getUserRegistryPath();
56
57
kj::Promise<Result<Registries>> getRegistries(
ref<Store>
store);
58
59
void
overrideRegistry(
60
const
Input & from,
61
const
Input & to,
62
const
Attrs & extraAttrs);
63
64
kj::Promise<Result<std::pair<Input, Attrs>>> lookupInRegistries(
65
ref<Store>
store,
66
const
Input & input);
67
68
}
nix::Store
Definition
store-api.hh:195
nix::ref
Definition
ref.hh:19
fetchers.hh
nix::fetchers::Input
Definition
fetchers.hh:39
nix::fetchers::Registry::Entry
Definition
registry.hh:24
types.hh
nix::Path
std::string Path
Definition
types.hh:28
lix
libfetchers
registry.hh
Generated by
1.15.0