aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-04-17 21:51:59 +0200
committerPuck Meerburg <puck@puckipedia.com>2024-04-21 10:27:32 +0000
commitc1319831fbf26131c0a973b705b9bba7f067a601 (patch)
tree382f1f9565b45565169673adbb54beaf7026d5c5 /src/libstore
parent111db8b38fd8350d92d72fa17fd3d9e8ef5a0e09 (diff)
Fix exportReferencesGraph when given store subpath
With Nix 2.3, it was possible to pass a subpath of a store path to exportReferencesGraph: with import <nixpkgs> {}; let hello = writeShellScriptBin "hello" '' echo ${toString builtins.currentTime} ''; in writeClosure [ "${hello}/bin/hello" ] This regressed with Nix 2.4, with a very confusing error message, that presumably indicates it was unintentional: error: path '/nix/store/3gl7kgjr4pwf03f0x70dgx9ln3bhl7zc-hello/bin/hello' is not in the Nix store (cherry picked from commit 0774e8ba33c060f56bad3ff696796028249e915a) Change-Id: I00920fb33077b831a1bb4a1b68d515ba8c3c2a69
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/parsed-derivations.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/parsed-derivations.cc b/src/libstore/parsed-derivations.cc
index 1d900c272..992a79c6e 100644
--- a/src/libstore/parsed-derivations.cc
+++ b/src/libstore/parsed-derivations.cc
@@ -151,7 +151,7 @@ std::optional<nlohmann::json> ParsedDerivation::prepareStructuredAttrs(Store & s
for (auto i = e->begin(); i != e->end(); ++i) {
StorePathSet storePaths;
for (auto & p : *i)
- storePaths.insert(store.parseStorePath(p.get<std::string>()));
+ storePaths.insert(store.toStorePath(p.get<std::string>()).first);
json[i.key()] = store.pathInfoToJSON(
store.exportReferences(storePaths, inputPaths), false, true);
}