@@ -222,7 +222,8 @@ void derivationToValue(
222222 path2,
223223 {
224224 NixStringContextElem::DrvDeep{.drvPath = storePath},
225- });
225+ },
226+ state.mem );
226227 attrs.alloc (state.s .name ).mkString (drv.env [" name" ]);
227228
228229 auto list = state.buildList (drv.outputs .size ());
@@ -1811,7 +1812,8 @@ static void derivationStrictInternal(EvalState & state, std::string_view drvName
18111812 drvPathS,
18121813 {
18131814 NixStringContextElem::DrvDeep{.drvPath = drvPath},
1814- });
1815+ },
1816+ state.mem );
18151817 for (auto & i : drv.outputs )
18161818 mkOutputString (state, result, drvPath, i);
18171819
@@ -1864,7 +1866,7 @@ static void prim_toPath(EvalState & state, const PosIdx pos, Value ** args, Valu
18641866 NixStringContext context;
18651867 auto path =
18661868 state.coerceToPath (pos, *args[0 ], context, " while evaluating the first argument passed to builtins.toPath" );
1867- v.mkString (path.path .abs (), context);
1869+ v.mkString (path.path .abs (), context, state. mem );
18681870}
18691871
18701872static RegisterPrimOp primop_toPath ({
@@ -1907,7 +1909,7 @@ static void prim_storePath(EvalState & state, const PosIdx pos, Value ** args, V
19071909 if (!settings.readOnlyMode )
19081910 state.store ->ensurePath (path2);
19091911 context.insert (NixStringContextElem::Opaque{.path = path2});
1910- v.mkString (path.abs (), context);
1912+ v.mkString (path.abs (), context, state. mem );
19111913}
19121914
19131915static RegisterPrimOp primop_storePath ({
@@ -1989,7 +1991,8 @@ static void prim_baseNameOf(EvalState & state, const PosIdx pos, Value ** args,
19891991 v.mkString (
19901992 legacyBaseNameOf (*state.coerceToString (
19911993 pos, *args[0 ], context, " while evaluating the first argument passed to builtins.baseNameOf" , false , false )),
1992- context);
1994+ context,
1995+ state.mem );
19931996}
19941997
19951998static RegisterPrimOp primop_baseNameOf ({
@@ -2025,11 +2028,11 @@ static void prim_dirOf(EvalState & state, const PosIdx pos, Value ** args, Value
20252028 pos, *args[0 ], context, " while evaluating the first argument passed to 'builtins.dirOf'" , false , false );
20262029 auto pos = path->rfind (' /' );
20272030 if (pos == path->npos )
2028- v.mkStringMove (" ." _sds, context);
2031+ v.mkStringMove (" ." _sds, context, state. mem );
20292032 else if (pos == 0 )
2030- v.mkStringMove (" /" _sds, context);
2033+ v.mkStringMove (" /" _sds, context, state. mem );
20312034 else
2032- v.mkString (path->substr (0 , pos), context);
2035+ v.mkString (path->substr (0 , pos), context, state. mem );
20332036 }
20342037}
20352038
@@ -2071,7 +2074,7 @@ static void prim_readFile(EvalState & state, const PosIdx pos, Value ** args, Va
20712074 .path = std::move ((StorePath &&) p),
20722075 });
20732076 }
2074- v.mkString (s, context);
2077+ v.mkString (s, context, state. mem );
20752078}
20762079
20772080static RegisterPrimOp primop_readFile ({
@@ -2467,7 +2470,7 @@ static void prim_toXML(EvalState & state, const PosIdx pos, Value ** args, Value
24672470 std::ostringstream out;
24682471 NixStringContext context;
24692472 printValueAsXML (state, true , false , *args[0 ], out, context, pos);
2470- v.mkString (out.view (), context);
2473+ v.mkString (out.view (), context, state. mem );
24712474}
24722475
24732476static RegisterPrimOp primop_toXML ({
@@ -2575,7 +2578,7 @@ static void prim_toJSON(EvalState & state, const PosIdx pos, Value ** args, Valu
25752578 std::ostringstream out;
25762579 NixStringContext context;
25772580 printValueAsJSON (state, true , *args[0 ], pos, out, context);
2578- v.mkString (out.view (), context);
2581+ v.mkString (out.view (), context, state. mem );
25792582}
25802583
25812584static RegisterPrimOp primop_toJSON ({
@@ -4404,7 +4407,7 @@ static void prim_toString(EvalState & state, const PosIdx pos, Value ** args, Va
44044407 NixStringContext context;
44054408 auto s = state.coerceToString (
44064409 pos, *args[0 ], context, " while evaluating the first argument passed to builtins.toString" , true , false );
4407- v.mkString (*s, context);
4410+ v.mkString (*s, context, state. mem );
44084411}
44094412
44104413static RegisterPrimOp primop_toString ({
@@ -4477,7 +4480,7 @@ static void prim_substring(EvalState & state, const PosIdx pos, Value ** args, V
44774480 auto s = state.coerceToString (
44784481 pos, *args[2 ], context, " while evaluating the third argument (the string) passed to builtins.substring" );
44794482
4480- v.mkString (NixUInt (start) >= s->size () ? " " : s->substr (start, _len), context);
4483+ v.mkString (NixUInt (start) >= s->size () ? " " : s->substr (start, _len), context, state. mem );
44814484}
44824485
44834486static RegisterPrimOp primop_substring ({
@@ -4875,7 +4878,7 @@ static void prim_concatStringsSep(EvalState & state, const PosIdx pos, Value **
48754878 " while evaluating one element of the list of strings to concat passed to builtins.concatStringsSep" );
48764879 }
48774880
4878- v.mkString (res, context);
4881+ v.mkString (res, context, state. mem );
48794882}
48804883
48814884static RegisterPrimOp primop_concatStringsSep ({
@@ -4950,7 +4953,7 @@ static void prim_replaceStrings(EvalState & state, const PosIdx pos, Value ** ar
49504953 }
49514954 }
49524955
4953- v.mkString (res, context);
4956+ v.mkString (res, context, state. mem );
49544957}
49554958
49564959static RegisterPrimOp primop_replaceStrings ({
0 commit comments