#pragma once #include "util.hh" #include "path.hh" #include "eval.hh" #include namespace nix { struct Buildable { std::optional drvPath; std::map outputs; }; typedef std::vector Buildables; struct Installable { virtual ~Installable() { } virtual std::string what() = 0; virtual Buildables toBuildables() { throw Error("argument '%s' cannot be built", what()); } Buildable toBuildable(); virtual std::pair toValue(EvalState & state) { throw Error("argument '%s' cannot be evaluated", what()); } /* Return a value only if this installable is a store path or a symlink to it. */ virtual std::optional getStorePath() { return {}; } }; }