diff --git a/src/libexpr/primops/fromTOML.cc b/src/libexpr/primops/fromTOML.cc index b4f1df7a8..40c4f5835 100644 --- a/src/libexpr/primops/fromTOML.cc +++ b/src/libexpr/primops/fromTOML.cc @@ -63,7 +63,7 @@ static void prim_fromTOML(EvalState & state, const PosIdx pos, Value * * args, V { if (experimentalFeatureSettings.isEnabled(Xp::ParseTomlTimestamps)) { auto attrs = state.buildBindings(2); - attrs.alloc("_type").mkString("timestamp"); + attrs.alloc("_type").mkStringNoCopy("timestamp"); std::ostringstream s; s << t; attrs.alloc("value").mkString(s.str()); diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc index a24dd11d6..3a1ebc2ed 100644 --- a/src/nix-env/user-env.cc +++ b/src/nix-env/user-env.cc @@ -61,7 +61,7 @@ bool createUserEnv(EvalState & state, PackageInfos & elems, auto attrs = state.buildBindings(7 + outputs.size()); - attrs.alloc(state.sType).mkString("derivation"); + attrs.alloc(state.sType).mkStringNoCopy("derivation"); attrs.alloc(state.sName).mkString(i.queryName()); auto system = i.querySystem(); if (!system.empty())