Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
parsed-derivations.hh
Go to the documentation of this file.
1#pragma once
3
4#include "lix/libutil/json-fwd.hh"
7
8namespace nix {
9
10class ParsedDerivation
11{
12 StorePath drvPath;
13 BasicDerivation & drv;
14 std::unique_ptr<JSON> structuredAttrs;
15
16public:
17
18 ParsedDerivation(const StorePath & drvPath, BasicDerivation & drv);
19
20 ~ParsedDerivation();
21
22 const JSON * getStructuredAttrs() const
23 {
24 return structuredAttrs.get();
25 }
26
27 std::optional<std::string> getStringAttr(const std::string & name) const;
28
29 bool getBoolAttr(const std::string & name, bool def = false) const;
30
31 std::optional<Strings> getStringsAttr(const std::string & name) const;
32
33 StringSet getRequiredSystemFeatures() const;
34
35 bool canBuildLocally(Store & localStore) const;
36
37 bool willBuildLocally(Store & localStore) const;
38
39 bool substitutesAllowed() const;
40
41 bool useUidRange() const;
42
43 kj::Promise<Result<std::optional<JSON>>>
44 prepareStructuredAttrs(Store & store, const StorePathSet & inputPaths);
45};
46
47std::string writeStructuredAttrsShell(const JSON & json);
48
49}
Definition path.hh:21
Definition store-api.hh:195
Definition derivations.hh:274