diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-02 11:51:34 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-04-02 11:51:34 +0200 |
commit | ed13457dbf1a78f47f760e349985b23dfd5f16c4 (patch) | |
tree | 744ec8358d7bc0d907e498c31b0b6baadf9e257b /src/libfetchers | |
parent | 74024515a306a382f11058d4320b80897ebe09a0 (diff) |
nix flake info --json: Show TreeInfo
Diffstat (limited to 'src/libfetchers')
-rw-r--r-- | src/libfetchers/fetchers.cc | 6 | ||||
-rw-r--r-- | src/libfetchers/tree-info.hh | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc index 5a782a4fe..765a6585f 100644 --- a/src/libfetchers/fetchers.cc +++ b/src/libfetchers/fetchers.cc @@ -81,10 +81,4 @@ std::shared_ptr<const Input> Input::applyOverrides( return shared_from_this(); } -StorePath TreeInfo::computeStorePath(Store & store) const -{ - assert(narHash); - return store.makeFixedOutputPath(true, narHash, "source"); -} - } diff --git a/src/libfetchers/tree-info.hh b/src/libfetchers/tree-info.hh index 02e92759b..25cee445e 100644 --- a/src/libfetchers/tree-info.hh +++ b/src/libfetchers/tree-info.hh @@ -1,6 +1,9 @@ #pragma once #include "path.hh" +#include "hash.hh" + +#include <nlohmann/json_fwd.hpp> namespace nix { class Store; } @@ -21,6 +24,8 @@ struct TreeInfo } StorePath computeStorePath(Store & store) const; + + nlohmann::json toJson() const; }; } |