19 typedef std::map<std::string, std::optional<StorePath>> Outputs;
24 mutable std::string name;
25 mutable std::string system;
26 mutable std::optional<std::optional<StorePath>> drvPath;
27 mutable std::optional<StorePath> outPath;
28 mutable std::string outputName;
36 const Bindings * attrs =
nullptr, * meta =
nullptr;
40 bool checkMeta(
Value & v);
48 PackageInfo(
EvalState & state) : state(&state) { };
52 std::string queryName()
const;
53 std::string querySystem()
const;
54 std::optional<StorePath> queryDrvPath()
const;
57 std::string queryOutputName()
const;
64 StringSet queryMetaNames();
65 Value * queryMeta(
const std::string &
name);
66 std::string queryMetaString(
const std::string &
name);
67 NixInt queryMetaInt(
const std::string &
name, NixInt def);
68 NixFloat queryMetaFloat(
const std::string &
name, NixFloat def);
69 bool queryMetaBool(
const std::string &
name,
bool def);
70 void setMeta(
const std::string &
name,
Value * v);
77 void setName(
const std::string &
s) {
name =
s; }
78 void setDrvPath(StorePath
path) { drvPath = {{std::move(
path)}}; }
79 void setOutPath(StorePath path) { outPath = {{std::move(path)}}; }
81 void setFailed() { failed =
true; };
82 bool hasFailed() {
return failed; };
86typedef std::list<PackageInfo, traceable_allocator<PackageInfo>> PackageInfos;
93std::optional<PackageInfo> getDerivation(
EvalState & state,
94 Value & v,
bool ignoreAssertionFailures);
96void getDerivations(
EvalState & state,
Value & v,
const std::string & pathPrefix,
97 Bindings & autoArgs, PackageInfos & drvs,
98 bool ignoreAssertionFailures);
Definition attr-set.hh:48
@ Outputs
Definition installables.hh:23
ChunkedVector< std::string, 8192 > store
Definition lexer.l:1011
return s
Definition lexer.l:459
const std::string_view & name
Definition lexer.l:1709
std::string path
Definition lexer.l:1399
Definition get-drvs.hh:17
std::string attrPath
Definition get-drvs.hh:46
Outputs queryOutputs(bool withPaths=true, bool onlyOutputsToInstall=false)
Definition get-drvs.cc:111