diff options
author | Vincent Ambo <mail@tazj.in> | 2022-05-18T15·39+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-05-19T14·08+0000 |
commit | d127f9bd0e7b9b2e0df2de8a2227f77c0907468d (patch) | |
tree | 68455040d88b8e0c2817601db88ede450873ff8e /third_party/nix/src/libexpr/get-drvs.hh | |
parent | c85291c602ac666421627d6934ebc6d5be1b93e1 (diff) |
chore(3p/nix): unvendor tvix 0.1 r/4098
Nothing is using this now, and we'll likely never pick this up again, but we learned a lot in the process. Every now and then this breaks in some bizarre way on channel bumps and it's just a waste of time to maintain that. Change-Id: Idcf2f5acd4ca7070ce18d7149cbfc0d967dc0a44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5632 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'third_party/nix/src/libexpr/get-drvs.hh')
-rw-r--r-- | third_party/nix/src/libexpr/get-drvs.hh | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/third_party/nix/src/libexpr/get-drvs.hh b/third_party/nix/src/libexpr/get-drvs.hh deleted file mode 100644 index 3de266d0c0e7..000000000000 --- a/third_party/nix/src/libexpr/get-drvs.hh +++ /dev/null @@ -1,83 +0,0 @@ -#pragma once - -#include <map> -#include <string> - -#include "libexpr/eval.hh" - -namespace nix { - -struct DrvInfo { - public: - typedef std::map<std::string, Path> Outputs; - - private: - EvalState* state; - - mutable std::string name; - mutable std::string system; - mutable std::string drvPath; - mutable std::string outPath; - mutable std::string outputName; - Outputs outputs; - - bool failed = false; // set if we get an AssertionError - - std::shared_ptr<Bindings> attrs = nullptr; - std::shared_ptr<Bindings> meta = nullptr; - - Bindings* getMeta(); - - bool checkMeta(Value& v); - - public: - std::string attrPath; /* path towards the derivation */ - - DrvInfo(EvalState& state) : state(&state){}; - DrvInfo(EvalState& state, std::string attrPath, - std::shared_ptr<Bindings> attrs); - DrvInfo(EvalState& state, const ref<Store>& store, - const std::string& drvPathWithOutputs); - - std::string queryName() const; - std::string querySystem() const; - std::string queryDrvPath() const; - std::string queryOutPath() const; - std::string queryOutputName() const; - /** Return the list of outputs. The "outputs to install" are determined by - * `meta.outputsToInstall`. */ - Outputs queryOutputs(bool onlyOutputsToInstall = false); - - StringSet queryMetaNames(); - Value* queryMeta(const std::string& name); - std::string queryMetaString(const std::string& name); - NixInt queryMetaInt(const std::string& name, NixInt def); - NixFloat queryMetaFloat(const std::string& name, NixFloat def); - bool queryMetaBool(const std::string& name, bool def); - void setMeta(const std::string& name, Value* v); - - /* - MetaInfo queryMetaInfo(EvalState & state) const; - MetaValue queryMetaInfo(EvalState & state, const std::string & name) const; - */ - - void setName(const std::string& s) { name = s; } - void setDrvPath(const std::string& s) { drvPath = s; } - void setOutPath(const std::string& s) { outPath = s; } - - void setFailed() { failed = true; }; - bool hasFailed() { return failed; }; -}; - -using DrvInfos = std::list<DrvInfo>; - -/* If value `v' denotes a derivation, return a DrvInfo object - describing it. Otherwise return nothing. */ -std::optional<DrvInfo> getDerivation(EvalState& state, Value& v, - bool ignoreAssertionFailures); - -void getDerivations(EvalState& state, Value& v, const std::string& pathPrefix, - Bindings* autoArgs, DrvInfos& drvs, - bool ignoreAssertionFailures); - -} // namespace nix |