aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc2
-rw-r--r--src/nix-env/user-env.cc8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 9a68899cd..96f3c3b26 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -1241,7 +1241,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs)
Attr & a(*attrs.find(i.name));
if(a.value->type() != nString) continue;
XMLAttrs attrs3;
- attrs3["type"] = i.name;
+ attrs3["type"] = globals.state->symbols[i.name];
attrs3["value"] = a.value->string.s;
xml.writeEmptyElement("string", attrs3);
}
diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc
index 927dd6d97..cad7f9c88 100644
--- a/src/nix-env/user-env.cc
+++ b/src/nix-env/user-env.cc
@@ -105,8 +105,10 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
/* Also write a copy of the list of user environment elements to
the store; we need it for future modifications of the
environment. */
+ std::ostringstream str;
+ manifest.print(state.symbols, str, true);
auto manifestFile = state.store->addTextToStore("env-manifest.nix",
- fmt("%s", manifest), references);
+ str.str(), references);
/* Get the environment builder expression. */
Value envBuilder;
@@ -132,9 +134,9 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
state.forceValue(topLevel, [&]() { return topLevel.determinePos(noPos); });
PathSet context;
Attr & aDrvPath(*topLevel.attrs->find(state.sDrvPath));
- auto topLevelDrv = state.coerceToStorePath(*aDrvPath.pos, *aDrvPath.value, context, "");
+ auto topLevelDrv = state.coerceToStorePath(aDrvPath.pos, *aDrvPath.value, context, "");
Attr & aOutPath(*topLevel.attrs->find(state.sOutPath));
- auto topLevelOut = state.coerceToStorePath(*aOutPath.pos, *aOutPath.value, context, "");
+ auto topLevelOut = state.coerceToStorePath(aOutPath.pos, *aOutPath.value, context, "");
/* Realise the resulting store expression. */
debug("building user environment");