diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-17 18:37:35 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-19 10:06:40 -0500 |
commit | cd583362ecbae9726714b6abf70882905304ca5a (patch) | |
tree | 12beade69aa4d6b364f40c419e7aa5bd97a433a9 /src/libstore/derivations.hh | |
parent | a88ae62bc0e404b7f87876bfd0a74afbac4d517d (diff) |
Move `Derivation` toJSON logic to libnixstore
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r-- | src/libstore/derivations.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index f42c13cdc..8456b29e7 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -83,6 +83,11 @@ struct DerivationOutput : _DerivationOutputRaw inline const Raw & raw() const { return static_cast<const Raw &>(*this); } + + nlohmann::json toJSON( + const Store & store, + std::string_view drvName, + std::string_view outputName) const; }; typedef std::map<std::string, DerivationOutput> DerivationOutputs; @@ -210,6 +215,8 @@ struct Derivation : BasicDerivation Derivation() = default; Derivation(const BasicDerivation & bd) : BasicDerivation(bd) { } Derivation(BasicDerivation && bd) : BasicDerivation(std::move(bd)) { } + + nlohmann::json toJSON(const Store & store) const; }; |