From aebfe37dfdfa98f0007fa52b558dc21a4af89c82 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Sat, 28 Jun 2025 19:56:56 +0200 Subject: [PATCH] texlivePackages.texaccents: fix broken script (#410913) --- pkgs/test/texlive/default.nix | 3 --- .../typesetting/tex/texlive/fixed-hashes.nix | 4 ++-- .../typesetting/tex/texlive/tlpdb-overrides.nix | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index 34bbc12efaee..58898833b573 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -441,9 +441,6 @@ rec { # do not know how to test without a valid build.lua "ppmcheckpdf" - # *.inc files in source container rather than run - "texaccents" - # 'Error initialising QuantumRenderer: no suitable pipeline found' "tlcockpit" ] ++ lib.optional stdenv.hostPlatform.isDarwin "epspdftk"; # wish shebang is a script, not a binary! diff --git a/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix b/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix index b4642e3419ca..5d3404fce5b4 100644 --- a/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix +++ b/pkgs/tools/typesetting/tex/texlive/fixed-hashes.nix @@ -17149,9 +17149,9 @@ source = "0k78zyxmvijabrh08jjxfxjcdxzq6py5sbfcddrs5kn0hkf4hp9m"; }; texaccents-64447 = { - run = "0xai85qn9isnrvijw9shhljlkcnvmygni18kw02gsmij0dp9c1jp"; + run = "0kq5432kl59pb0q1way09d527afjx5bh2y7jmv82f9y5cz7n3kyi"; doc = "02185jla4hffra1wf3mgiaq8lyxh4gxgcjrb5dv3mkrw709iidcz"; - source = "1wqbdmfly54sb8q1y6ms2wg8n62w34xpbfvxvwmg5i4as4a1ycmy"; + source = "09z1nkh7x0xyzlh38yklxrdp9phg7i88fw69mphzy0cfc3ql8l0d"; }; texapi-54080 = { run = "09cnhqn4gxf0alkx0276jkpcsd0myypbn94jzsavnjq8jknp6850"; diff --git a/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix b/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix index 00e7ea5a9509..556397b4b84e 100644 --- a/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix +++ b/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix @@ -456,6 +456,21 @@ lib.recursiveUpdate orig rec { substituteInPlace "$out"/bin/latexminted --replace-fail "__file__" "\"$scriptsFolder/latexminted.py\"" ''; + # find files in source container, fix incompatibilities with snobol4 + texaccents.postFixup = '' + sed -i '1s!$! -I${tl.texaccents.texsource}/source/support/texaccents!' "$out"/bin/* + ''; + texaccents.postUnpack = '' + if [[ -f "$out"/source/support/texaccents/grepl.inc ]] ; then + sed -i 's!^-include "repl.inc"!-include "repl.sno"!' "$out"/source/support/texaccents/grepl.inc + elif [[ -f "$out"/scripts/texaccents/texaccents.sno ]] ; then + sed -i -e 's!^-include "host.inc"!-include "host.sno"!' \ + -e 's/host(2,2)/host(2,host(3))/g' \ + -e 's/host(2,3)/host(2,host(3) + 1)/g' \ + "$out"/scripts/texaccents/texaccents.sno + fi + ''; + # flag lua dependency texblend.scriptExts = [ "lua" ];