diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-03-01 05:48:01 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-04-05 08:31:37 -0400 |
commit | f7d9f7c3381acef38e4db2bb2f9e0287c289be54 (patch) | |
tree | 7e084351125d7ede24e275076d4372f5636dabf4 /src/libcmd/installables.hh | |
parent | a07dc7e0d99d1cd91643c9ecc2b672399471eaf4 (diff) |
Pull out Buildable into its own file/header in libnixstore
Diffstat (limited to 'src/libcmd/installables.hh')
-rw-r--r-- | src/libcmd/installables.hh | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/libcmd/installables.hh b/src/libcmd/installables.hh index b714f097b..d31afd3d5 100644 --- a/src/libcmd/installables.hh +++ b/src/libcmd/installables.hh @@ -2,13 +2,12 @@ #include "util.hh" #include "path.hh" +#include "buildable.hh" #include "eval.hh" #include "flake/flake.hh" #include <optional> -#include <nlohmann/json_fwd.hpp> - namespace nix { struct DrvInfo; @@ -16,25 +15,6 @@ struct SourceExprCommand; namespace eval_cache { class EvalCache; class AttrCursor; } -struct BuildableOpaque { - StorePath path; - nlohmann::json toJSON(ref<Store> store) const; -}; - -struct BuildableFromDrv { - StorePath drvPath; - std::map<std::string, std::optional<StorePath>> outputs; - nlohmann::json toJSON(ref<Store> store) const; -}; - -typedef std::variant< - BuildableOpaque, - BuildableFromDrv -> Buildable; - -typedef std::vector<Buildable> Buildables; -nlohmann::json buildablesToJSON(const Buildables & buildables, ref<Store> store); - struct App { std::vector<StorePathWithOutputs> context; |