From b8a38fa52171f0a8077db29f23df86c31ee02545 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 14 Dec 2019 23:09:57 +0100 Subject: [PATCH] Fix 'nix profile' --- src/nix/profile.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nix/profile.cc b/src/nix/profile.cc index 6ea529f52..8ff0e4dd9 100644 --- a/src/nix/profile.cc +++ b/src/nix/profile.cc @@ -126,9 +126,11 @@ struct ProfileManifest StringSink sink; dumpPath(tempDir, sink); - ValidPathInfo info(store->makeFixedOutputPath(true, info.narHash, "profile", references)); + auto narHash = hashString(htSHA256, *sink.s); + + ValidPathInfo info(store->makeFixedOutputPath(true, narHash, "profile", references)); info.references = std::move(references); - info.narHash = hashString(htSHA256, *sink.s); + info.narHash = narHash; info.narSize = sink.s->size(); info.ca = makeFixedOutputCA(true, info.narHash);