From fad9faf3545f115e33e522eb11802e2825c8c425 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 2 Feb 2020 12:29:53 +0100 Subject: Add TreeInfo::computeStorePath() --- src/libexpr/flake/lockfile.cc | 3 +-- src/libexpr/flake/lockfile.hh | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libexpr') diff --git a/src/libexpr/flake/lockfile.cc b/src/libexpr/flake/lockfile.cc index 6a64f113e..3d796eadc 100644 --- a/src/libexpr/flake/lockfile.cc +++ b/src/libexpr/flake/lockfile.cc @@ -111,8 +111,7 @@ nlohmann::json LockedInput::toJson() const StorePath LockedInput::computeStorePath(Store & store) const { - assert(info.narHash); - return store.makeFixedOutputPath(true, info.narHash, "source"); + return info.computeStorePath(store); } LockedInputs::LockedInputs(const nlohmann::json & json) diff --git a/src/libexpr/flake/lockfile.hh b/src/libexpr/flake/lockfile.hh index 6333a6875..6203c40cb 100644 --- a/src/libexpr/flake/lockfile.hh +++ b/src/libexpr/flake/lockfile.hh @@ -11,6 +11,8 @@ struct StorePath; namespace nix::flake { +using namespace fetchers; + typedef std::vector InputPath; struct LockedInput; -- cgit v1.2.3