diff options
Diffstat (limited to 'src/libstore/parsed-derivations.hh')
-rw-r--r-- | src/libstore/parsed-derivations.hh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libstore/parsed-derivations.hh b/src/libstore/parsed-derivations.hh index cec868754..f4df5dd54 100644 --- a/src/libstore/parsed-derivations.hh +++ b/src/libstore/parsed-derivations.hh @@ -1,6 +1,6 @@ #include "derivations.hh" -#include <nlohmann/json.hpp> +#include <nlohmann/json_fwd.hpp> namespace nix { @@ -8,15 +8,17 @@ class ParsedDerivation { StorePath drvPath; BasicDerivation & drv; - std::optional<nlohmann::json> structuredAttrs; + std::unique_ptr<nlohmann::json> structuredAttrs; public: ParsedDerivation(StorePath && drvPath, BasicDerivation & drv); - const std::optional<nlohmann::json> & getStructuredAttrs() const + ~ParsedDerivation(); + + const nlohmann::json * getStructuredAttrs() const { - return structuredAttrs; + return structuredAttrs.get(); } std::optional<std::string> getStringAttr(const std::string & name) const; |