From 4a2f32b16c890ec371013959bc8c4fd9f2921758 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Thu, 21 Mar 2024 21:08:30 +0000 Subject: [PATCH] texlive.pkgs.context: fix other writes to const loop variables --- .../typesetting/tex/texlive/fixed-hashes.nix | 2 +- ...xrun-local-vars.patch => mtx-local-vars.patch} | 15 +++++++++++++++ .../typesetting/tex/texlive/tlpdb-overrides.nix | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) rename pkgs/tools/typesetting/tex/texlive/{mtxrun-local-vars.patch => mtx-local-vars.patch} (79%) diff --git a/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix b/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix index 42e5b7cb1294..18a0a40edaf5 100644 --- a/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix +++ b/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix @@ -828,7 +828,7 @@ conditext-55387={run="0g6clck3v75yvg7gv42w24zv18vi5jcg1q9k663cxldix77lkgbc";doc= confproc-29349={run="1s4mv0g2x5mfxnkp0i29wa3ncbx9fa05qqf734fjppdzsgic079i";doc="021kbis3c73gnavrjhqa34fsbq5c94lmjym2d4ny2wpk9xagh994";source="0dpghxh9mq2sr7aqgcj15h6b4xh7x5hvdzph6606izpff8ac7h8c";}; constants-15878={run="11naj0z8ppb6h07r7cff0lcmr8zgc29kp3x7spi60zi6cq2546gk";doc="1wgvq0x1kjgd0bs0024fkh7wis9aw9qryd7y0igrbgdgc722pjnp";source="01skagh044v62vw12kmibgd6y42z5r1glrsvi9y0h76vs52jz7hr";}; conteq-37868={run="1h7b98qw9hl73gh4zidy59z4rly9afnvmah75jgvh0k1v1hm09df";doc="0kgdggc8gpd1h7kdbh3ala5kz8rs56bgmwgv9wvxsqx4sn19q2fy";source="1y0g7sj696d6qhcw8vrpxr8gwik54slp7lijbxz64ksqbw5xjqv8";}; -context-69665={run="0f5pcqh9msx64hbrg4jfr4cfp6hzcy6di7hnly5whw4yvs9wr9s6";doc="1nh2yf7vb800cnnmzic5hmy4w5kxd38y1py1xjg7madphb9zdc60";}; +context-69665={run="1z6knaa8mffb4ds36k1h15qymh7f2aw9fwq38jw5cqzna6s8zzs0";doc="1nh2yf7vb800cnnmzic5hmy4w5kxd38y1py1xjg7madphb9zdc60";}; context-calendar-examples-66947={run="0asc49mn24ql4fk73089viy3s6wff865xk8af7h67ffsb5qjnld8";doc="0wza057wz18yf2zl1j77hddzimwnraw5wg1579ncksywvhnmx3rp";}; context-collating-marks-68696={run="12vqvbp7ns9r5nc7p7nrlsll3jp3hc4xi9wjyjq8lrmd8ly3v26w";doc="0nawd3x4rl73s4mhpq2wd1sqa8i6k2n0a39sqcaf21zx99mpiqp0";}; context-cyrillicnumbers-47085={run="1gk4ncbfzilj98s7k7s43k6vb3il511k434aj34fsvqh5x9x4aw2";doc="0f7r9qgfc8h92jprjqa24q4vpz4bqrrns3glhmwh3qmk1f2gyw73";}; diff --git a/pkgs/tools/typesetting/tex/texlive/mtxrun-local-vars.patch b/pkgs/tools/typesetting/tex/texlive/mtx-local-vars.patch similarity index 79% rename from pkgs/tools/typesetting/tex/texlive/mtxrun-local-vars.patch rename to pkgs/tools/typesetting/tex/texlive/mtx-local-vars.patch index 459297713afc..a4a9859f56c0 100644 --- a/pkgs/tools/typesetting/tex/texlive/mtxrun-local-vars.patch +++ b/pkgs/tools/typesetting/tex/texlive/mtx-local-vars.patch @@ -89,3 +89,18 @@ local method,list=r[1],r[2] if method and list then for i=1,#list do +--- a/scripts/context/lua/mtx-context.lua 1970-01-01 01:00:01 ++++ b/scripts/context/lua/mtx-context.lua 2024-03-11 08:34:49 +@@ -613,8 +615,11 @@ + -- context flags get prepended by c: ... this will move to the sbx module + local t = { } + for k, v in table.sortedhash(flags) do ++ local p + if prefix then +- k = format("c:%s",k) ++ p = format("c:%s",k) ++ else ++ p = k + end + if not v or v == "" or v == '""' then + -- no need to flag false diff --git a/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix b/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix index cae95b8e2ee0..248817c17d41 100644 --- a/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix +++ b/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix @@ -356,11 +356,11 @@ in lib.recursiveUpdate orig rec { # tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README arabi-add.license = [ "lppl13c" ]; - # mtxrun.lua writes to const loop variables which is forbidden in recent LuaTeX + # mtxrun.lua and mtx-context.lua write to const loop variables which is forbidden in recent LuaTeX # patch manually generated by diffing against a recent cont-lmt.zip context.postUnpack = '' if [[ -f "$out"/scripts/context/lua/mtxrun.lua ]] ; then - patch -p1 -d "$out" < ${./mtxrun-local-vars.patch} + patch -p1 -d "$out" < ${./mtx-local-vars.patch} fi '';