aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-04-24 13:20:36 +0200
committerEelco Dolstra <edolstra@gmail.com>2023-04-24 13:20:36 +0200
commit01232358ffd78600d170ca5c1526a7031f6f2762 (patch)
treebabf00196894ec8b79fb963419fe4a6d44e56db4 /src/nix-env
parentcb2615cf4735cf28a6e538544c9abbf40cdd24a9 (diff)
parent7474a90db69813d051ab1bef35c7d0ab958d9ccd (diff)
Merge remote-tracking branch 'origin/master' into source-path
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc2
-rw-r--r--src/nix-env/user-env.cc6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 0081bab25..8b3f903f6 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -962,7 +962,7 @@ static void queryJSON(Globals & globals, std::vector<DrvInfo> & elems, bool prin
printError("derivation '%s' has invalid meta attribute '%s'", i.queryName(), j);
metaObj[j] = nullptr;
} else {
- PathSet context;
+ NixStringContext context;
metaObj[j] = printValueAsJSON(*globals.state, true, *v, noPos, context);
}
}
diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc
index f70381bf2..9e916abc4 100644
--- a/src/nix-env/user-env.cc
+++ b/src/nix-env/user-env.cc
@@ -119,9 +119,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
/* Construct a Nix expression that calls the user environment
builder with the manifest as argument. */
auto attrs = state.buildBindings(3);
- attrs.alloc("manifest").mkString(
- state.store->printStorePath(manifestFile),
- {state.store->printStorePath(manifestFile)});
+ state.mkStorePathString(manifestFile, attrs.alloc("manifest"));
attrs.insert(state.symbols.create("derivations"), &manifest);
Value args;
args.mkAttrs(attrs);
@@ -132,7 +130,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
/* Evaluate it. */
debug("evaluating user environment builder");
state.forceValue(topLevel, [&]() { return topLevel.determinePos(noPos); });
- PathSet context;
+ NixStringContext context;
Attr & aDrvPath(*topLevel.attrs->find(state.sDrvPath));
auto topLevelDrv = state.coerceToStorePath(aDrvPath.pos, *aDrvPath.value, context, "");
Attr & aOutPath(*topLevel.attrs->find(state.sOutPath));