aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-12-14 23:09:57 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-12-14 23:09:57 +0100
commitb8a38fa52171f0a8077db29f23df86c31ee02545 (patch)
treea0c72e8bc17fd88d483142ed78f58deec7bfb771 /src/nix
parenta045f93396a676bf5510700c9ac19f5c16bd69e8 (diff)
Fix 'nix profile'
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/profile.cc6
1 files 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);