Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nar-accessor.hh
Go to the documentation of this file.
1#pragma once
3
4#include "source-accessor.hh"
5
6#include <functional>
7
8#include <nlohmann/json_fwd.hpp>
9
10namespace nix {
11
12struct Source;
13
18ref<SourceAccessor> makeNarAccessor(std::string && nar);
19
20ref<SourceAccessor> makeNarAccessor(Source & source);
21
28using GetNarBytes = std::function<std::string(uint64_t, uint64_t)>;
29
30ref<SourceAccessor> makeLazyNarAccessor(
31 const std::string & listing,
32 GetNarBytes getNarBytes);
33
38nlohmann::json listNar(ref<SourceAccessor> accessor, const CanonPath & path, bool recurse);
39
40}
Definition canon-path.hh:41
Definition ref.hh:15
ref< SourceAccessor > accessor
Definition lexer.l:4655
std::function< std::string(uint64_t, uint64_t)> GetNarBytes
Definition nar-accessor.hh:28
Definition serialise.hh:68