Merge pull request #296453 from xworld21/texlive-2023-final

texlive: 2023.20240114 -> 2023-final
This commit is contained in:
Dmitry Kalinkin 2024-03-20 19:31:32 -04:00 committed by GitHub
commit 08843b8113
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 1827 additions and 1363 deletions

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub { lib, stdenv, fetchurl, fetchpatch
, autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake , autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake, pkg-config
, freeglut, ghostscriptX, imagemagick, fftw , freeglut, ghostscriptX, imagemagick, fftw, eigen, libtirpc
, boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv , boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv
, python3, qtbase, qtsvg, boost , python3, qtbase, qtsvg, boost
, zlib, perl, curl , zlib, perl, curl
@ -9,16 +9,25 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.87"; version = "2.88";
pname = "asymptote"; pname = "asymptote";
src = fetchFromGitHub { outputs = [ "out" "man" "info" "doc" "tex" ];
owner = "vectorgraphics";
repo = pname; src = fetchurl {
rev = version; url = "mirror://sourceforge/asymptote/${version}/asymptote-${version}.src.tgz";
hash = "sha256-xzRZ7NOWeu+uC5WeTxwh5MFm7psXMhxrxucT4PVtRxM="; hash = "sha256-DecadD+m7pORuH3Sdcs/5M3vUbN6rhSkFoNN0Soq9bs=";
}; };
patches = [
(fetchpatch {
# partial fix for macOS XDR/V3D support (LDFLAGS change seems like an unrelated bugfix)
name = "restore-LDFLAGS-dont-look-for-tirpc-under-MacOS.patch";
url = "https://github.com/vectorgraphics/asymptote/commit/7e17096b22d18d133d1bc5916b6e32c0cb24ad10.patch";
hash = "sha256-olCFzqfZwWOAjqlB5lDPXYRHU9i3VQNgoR0cO5TmW98=";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
autoreconfHook autoreconfHook
bison bison
@ -27,15 +36,16 @@ stdenv.mkDerivation rec {
texinfo texinfo
wrapQtAppsHook wrapQtAppsHook
cmake cmake
pkg-config
]; ];
buildInputs = [ buildInputs = [
ghostscriptX imagemagick fftw ghostscriptX imagemagick fftw eigen
boehmgc ncurses readline gsl libsigsegv boehmgc ncurses readline gsl libsigsegv
zlib perl curl qtbase qtsvg boost zlib perl curl qtbase qtsvg boost
(texliveSmall.withPackages (ps: with ps; [ epsf cm-super ps.texinfo media9 ocgx2 collection-latexextra ])) (texliveSmall.withPackages (ps: with ps; [ epsf cm-super ps.texinfo media9 ocgx2 collection-latexextra ]))
(python3.withPackages (ps: with ps; [ cson numpy pyqt5 ])) (python3.withPackages (ps: with ps; [ cson numpy pyqt5 ]))
]; ] ++ lib.optionals stdenv.isLinux [ libtirpc ];
propagatedBuildInputs = [ propagatedBuildInputs = [
glm glm
@ -47,14 +57,18 @@ stdenv.mkDerivation rec {
dontWrapQtApps = true; dontWrapQtApps = true;
# Do not build $tex/ls-R which will be generated by texlive.combine
preConfigure = '' preConfigure = ''
HOME=$TMP HOME=$TMP
substituteInPlace Makefile.in \
--replace-fail 'install: install-notexhash install-texhash' 'install: install-notexhash install-asy'
prependToVar configureFlags "--with-latex=$tex/tex/latex" "--with-context=$tex/tex/context/third"
''; '';
configureFlags = [ # do not use bundled libgc.so
"--with-latex=$out/share/texmf/tex/latex" configureFlags = [ "--enable-gc=system" ]
"--with-context=$out/share/texmf/tex/context/third" # TODO add open_memstream to enable XDR/V3D on Darwin (requires memstream or >=10.13 Apple SDK)
]; ++ lib.optional stdenv.isDarwin "--enable-xdr=no";
env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc"; env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc";
@ -62,12 +76,11 @@ stdenv.mkDerivation rec {
rm "$out"/bin/xasy rm "$out"/bin/xasy
makeQtWrapper "$out"/share/asymptote/GUI/xasy.py "$out"/bin/xasy --prefix PATH : "$out"/bin makeQtWrapper "$out"/share/asymptote/GUI/xasy.py "$out"/bin/xasy --prefix PATH : "$out"/bin
mv $out/share/info/asymptote/*.info $out/share/info/ mv "$info"/share/info/asymptote/*.info "$info"/share/info/
sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info sed -i -e 's|(asymptote/asymptote)|(asymptote)|' "$info"/share/info/asymptote.info
rmdir $out/share/info/asymptote rmdir "$info"/share/info/asymptote
rm -f $out/share/info/dir rm -f "$info"/share/info/dir
rm -rf $out/share/texmf
install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el
''; '';

View File

@ -308,11 +308,11 @@ chktex = stdenv.mkDerivation {
# for details see https://wiki.contextgarden.net/Building_LuaMetaTeX_for_TeX_Live # for details see https://wiki.contextgarden.net/Building_LuaMetaTeX_for_TeX_Live
context = stdenv.mkDerivation rec { context = stdenv.mkDerivation rec {
pname = "luametatex"; pname = "luametatex";
version = "2.10.08"; version = "2.11.02";
src = fetchurl { src = fetchurl {
url = "https://tug.org/svn/texlive/trunk/Master/source/luametatex-${version}.tar.xz?revision=67034&view=co"; url = "https://tug.org/svn/texlive/trunk/Master/source/luametatex-${version}.tar.xz?revision=70616&view=co";
hash = "sha256-3JeOUQ63jJOZWTxFCoyWjfcrspmdmC/yqgS1JaLfTWk="; hash = "sha256-o7esoBBTTYEstkd7l34BWxew3fIRdVcFiGxrT1/KP1o=";
}; };
enableParallelBuilding = true; enableParallelBuilding = true;
@ -328,11 +328,11 @@ context = stdenv.mkDerivation rec {
dvisvgm = stdenv.mkDerivation rec { dvisvgm = stdenv.mkDerivation rec {
pname = "dvisvgm"; pname = "dvisvgm";
version = "3.1.2"; version = "3.2.2";
src = assert lib.assertMsg (version == texlive.pkgs.dvisvgm.version) "dvisvgm: TeX Live version (${texlive.pkgs.dvisvgm.version}) different from source (${version}), please update dvisvgm"; fetchurl { src = assert lib.assertMsg (version == texlive.pkgs.dvisvgm.version) "dvisvgm: TeX Live version (${texlive.pkgs.dvisvgm.version}) different from source (${version}), please update dvisvgm"; fetchurl {
url = "https://github.com/mgieseki/dvisvgm/releases/download/${version}/dvisvgm-${version}.tar.gz"; url = "https://github.com/mgieseki/dvisvgm/releases/download/${version}/dvisvgm-${version}.tar.gz";
hash = "sha256-vqeDrf6TG3eUoMMNeQK4Kw1NmtaBbc2KCVqTHNM+rPY="; hash = "sha256-8GKL6lqjMUXXWwpqbdGPrYibdSc4y8AcGUGPNUc6HQA=";
}; };
configureFlags = [ configureFlags = [
@ -453,7 +453,7 @@ xdvi = stdenv.mkDerivation {
postInstall = '' postInstall = ''
substituteInPlace "$out/bin/xdvi" \ substituteInPlace "$out/bin/xdvi" \
--replace "exec xdvi-xaw" "exec '$out/bin/xdvi-xaw'" --replace-fail "exec xdvi-xaw" "exec '$out/bin/xdvi-xaw'"
''; '';
# TODO: it's suspicious that mktexpk generates fonts into ~/.texlive2014 # TODO: it's suspicious that mktexpk generates fonts into ~/.texlive2014
}; };
@ -489,7 +489,7 @@ xindy = stdenv.mkDerivation {
# hardcode clisp location # hardcode clisp location
postPatch = '' postPatch = ''
substituteInPlace xindy-*/user-commands/xindy.in \ substituteInPlace xindy-*/user-commands/xindy.in \
--replace "our \$clisp = ( \$is_windows ? 'clisp.exe' : 'clisp' ) ;" \ --replace-fail "our \$clisp = ( \$is_windows ? 'clisp.exe' : 'clisp' ) ;" \
"our \$clisp = '$(type -P clisp)';" "our \$clisp = '$(type -P clisp)';"
''; '';

View File

@ -378,7 +378,7 @@ let
if [[ -e "$out/bin/mtxrun" ]]; then if [[ -e "$out/bin/mtxrun" ]]; then
mv "$out"/bin/mtxrun.lua{,.orig} mv "$out"/bin/mtxrun.lua{,.orig}
substitute "$TEXMFDIST"/scripts/context/lua/mtxrun.lua "$out"/bin/mtxrun.lua \ substitute "$TEXMFDIST"/scripts/context/lua/mtxrun.lua "$out"/bin/mtxrun.lua \
--replace 'randomseed(math.initialseed)' "randomseed($SOURCE_DATE_EPOCH)" --replace-fail 'randomseed(math.initialseed)' "randomseed($SOURCE_DATE_EPOCH)"
fi fi
'' + '' +
# texlive postactions (see TeXLive::TLUtils::_do_postaction_script) # texlive postactions (see TeXLive::TLUtils::_do_postaction_script)
@ -409,7 +409,7 @@ let
# note that calling faketime and fmtutil is fragile (faketime uses LD_PRELOAD, fmtutil calls /bin/sh, causing potential glibc issues on non-NixOS) # note that calling faketime and fmtutil is fragile (faketime uses LD_PRELOAD, fmtutil calls /bin/sh, causing potential glibc issues on non-NixOS)
# so we patch fmtutil to use faketime, rather than calling faketime fmtutil # so we patch fmtutil to use faketime, rather than calling faketime fmtutil
substitute "$TEXMFDIST"/scripts/texlive/fmtutil.pl fmtutil \ substitute "$TEXMFDIST"/scripts/texlive/fmtutil.pl fmtutil \
--replace 'my $cmdline = "$eng -ini ' 'my $cmdline = "faketime -f '"'"'\@1980-01-01 00:00:00 x0.001'"'"' $eng -ini ' --replace-fail 'my $cmdline = "$eng -ini ' 'my $cmdline = "faketime -f '"'"'\@1980-01-01 00:00:00 x0.001'"'"' $eng -ini '
FORCE_SOURCE_DATE=1 TZ= perl fmtutil --sys --all | grep '^fmtutil' # too verbose FORCE_SOURCE_DATE=1 TZ= perl fmtutil --sys --all | grep '^fmtutil' # too verbose
# Disable unavailable map files # Disable unavailable map files

View File

@ -44,12 +44,12 @@ let
version = { version = {
# day of the snapshot being taken # day of the snapshot being taken
year = "2024"; year = "2024";
month = "01"; month = "03";
day = "14"; day = "16";
# TeX Live version # TeX Live version
texliveYear = 2023; texliveYear = 2023;
# final (historic) release or snapshot # final (historic) release or snapshot
final = false; final = true;
}; };
# The tarballs on CTAN mirrors for the current release are constantly # The tarballs on CTAN mirrors for the current release are constantly
@ -79,7 +79,7 @@ let
# use last mirror for daily snapshots as texlive.tlpdb.xz changes every day # use last mirror for daily snapshots as texlive.tlpdb.xz changes every day
# TODO make this less hacky # TODO make this less hacky
(if version.final then mirrors else [ (lib.last mirrors) ]); (if version.final then mirrors else [ (lib.last mirrors) ]);
hash = "sha256-eUG0KVfFPkjOczCsu2GAPRQcvcPrEIGqIsJNRc+AHDs="; hash = "sha256-w+04GBFDk/P/XvW7T9PotGD0nQslMkV9codca2urNK4=";
}; };
tlpdbNix = runCommand "tlpdb.nix" { tlpdbNix = runCommand "tlpdb.nix" {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,91 @@
--- a/scripts/context/lua/mtxrun.lua 1970-01-01 01:00:01
+++ b/cont-lmt/scripts/context/lua/mtxrun.lua 2024-03-11 08:34:49
@@ -2435,19 +2433,22 @@
tables[t]=tcopy
end
for i,v in next,t do
+ local k
if type(i)=="table" then
if tables[i] then
- i=tables[i]
+ k=tables[i]
else
- i=copy(i,tables)
+ k=copy(i,tables)
end
+ else
+ k=i
end
if type(v)~="table" then
- tcopy[i]=v
+ tcopy[k]=v
elseif tables[v] then
- tcopy[i]=tables[v]
+ tcopy[k]=tables[v]
else
- tcopy[i]=copy(v,tables)
+ tcopy[k]=copy(v,tables)
end
end
local mt=getmetatable(t)
@@ -12982,10 +13037,10 @@
else
value=is_boolean(value,value,true)
end
- w=topattern(w,true,true)
+ local p=topattern(w,true,true)
for name,functions in sortedhash(data) do
if done[name] then
- elseif find(name,w) then
+ elseif find(name,p) then
done[name]=true
for i=1,#functions do
functions[i](value)
@@ -13554,9 +13610,9 @@
if v then
v.state=value
else
- c=topattern(c,true,true)
+ local p=topattern(c,true,true)
for k,v in next,data do
- if find(k,c) then
+ if find(k,p) then
v.state=value
end
end
@@ -14499,10 +14556,7 @@
realtime=realtime+real
end
totaltime=totaltime+total
- if line<0 then
- line=0
- end
- dataset[#dataset+1]={ real,total,count,name,source,line }
+ dataset[#dataset+1]={ real,total,count,name,source,line<0 and 0 or line }
end
end
end
@@ -21135,10 +21251,10 @@
str=lpegmatch(stripper_1,str)
if validate then
for s in gmatch(str,"[^,]+") do
- s=validate(s)
- if s then
+ local v=validate(s)
+ if v then
n=n+1
- t[n]=s
+ t[n]=v
end
end
else
@@ -23552,7 +23690,8 @@
local result={}
local status={}
local done={}
- for k,r in next,results do
+ for k=1,#results do
+ local r=results[k]
local method,list=r[1],r[2]
if method and list then
for i=1,#list do

View File

@ -291,11 +291,6 @@ in lib.recursiveUpdate orig rec {
''; '';
#### other script fixes #### other script fixes
# wrong $0 expectations
bibcop.postFixup = ''
substituteInPlace "$out"/bin/bibcop --replace "basename(\$0) eq 'bibcop.pl'" "basename(\$0) eq 'bibcop'"
'';
# misc tab and python3 fixes # misc tab and python3 fixes
ebong.postFixup = '' ebong.postFixup = ''
sed -Ei 's/import sre/import re/; s/file\(/open(/g; s/\t/ /g; s/print +(.*)$/print(\1)/g' "$out"/bin/ebong sed -Ei 's/import sre/import re/; s/file\(/open(/g; s/\t/ /g; s/print +(.*)$/print(\1)/g' "$out"/bin/ebong
@ -305,12 +300,12 @@ in lib.recursiveUpdate orig rec {
# add runtime dependencies to PATH # add runtime dependencies to PATH
epspdf.postFixup = '' epspdf.postFixup = ''
sed -i '2ios.setenv("PATH","${lib.makeBinPath epspdf.extraBuildInputs}" .. (os.getenv("PATH") and ":" .. os.getenv("PATH") or ""))' "$out"/bin/epspdf sed -i '2ios.setenv("PATH","${lib.makeBinPath epspdf.extraBuildInputs}" .. (os.getenv("PATH") and ":" .. os.getenv("PATH") or ""))' "$out"/bin/epspdf
substituteInPlace "$out"/bin/epspdftk --replace '[info script]' "\"$scriptsFolder/epspdftk.tcl\"" substituteInPlace "$out"/bin/epspdftk --replace-fail '[info script]' "\"$scriptsFolder/epspdftk.tcl\""
''; '';
# find files in script directory, not in binary directory # find files in script directory, not in binary directory
latexindent.postFixup = '' latexindent.postFixup = ''
substituteInPlace "$out"/bin/latexindent --replace 'use FindBin;' "BEGIN { \$0 = '$scriptsFolder' . '/latexindent.pl'; }; use FindBin;" substituteInPlace "$out"/bin/latexindent --replace-fail 'use FindBin;' "BEGIN { \$0 = '$scriptsFolder' . '/latexindent.pl'; }; use FindBin;"
''; '';
# flag lua dependency # flag lua dependency
@ -330,14 +325,14 @@ in lib.recursiveUpdate orig rec {
# patch interpreter # patch interpreter
texosquery.postFixup = '' texosquery.postFixup = ''
substituteInPlace "$out"/bin/* --replace java "$interpJava" substituteInPlace "$out"/bin/* --replace-fail java "$interpJava"
''; '';
# hardcode revision numbers (since texlive.infra, tlshell are not in either system or user texlive.tlpdb) # hardcode revision numbers (since texlive.infra, tlshell are not in either system or user texlive.tlpdb)
tlshell.postFixup = '' tlshell.postFixup = ''
substituteInPlace "$out"/bin/tlshell \ substituteInPlace "$out"/bin/tlshell \
--replace '[dict get $::pkgs texlive.infra localrev]' '${toString orig."texlive.infra".revision}' \ --replace-fail '[dict get $::pkgs texlive.infra localrev]' '${toString orig."texlive.infra".revision}' \
--replace '[dict get $::pkgs tlshell localrev]' '${toString orig.tlshell.revision}' --replace-fail '[dict get $::pkgs tlshell localrev]' '${toString orig.tlshell.revision}'
''; '';
#### dependency changes #### dependency changes
@ -361,6 +356,14 @@ in lib.recursiveUpdate orig rec {
# tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README # tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README
arabi-add.license = [ "lppl13c" ]; arabi-add.license = [ "lppl13c" ];
# mtxrun.lua writes 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}
fi
'';
texdoc = { texdoc = {
extraRevision = "-tlpdb${toString tlpdbVersion.revision}"; extraRevision = "-tlpdb${toString tlpdbVersion.revision}";
extraVersion = "-tlpdb-${toString tlpdbVersion.revision}"; extraVersion = "-tlpdb-${toString tlpdbVersion.revision}";
@ -389,9 +392,9 @@ in lib.recursiveUpdate orig rec {
TEXMFCNF="${tl.kpathsea.tex}"/web2c TEXMF="$scriptsFolder/../.." \ TEXMFCNF="${tl.kpathsea.tex}"/web2c TEXMF="$scriptsFolder/../.." \
texlua "$out"/bin/texdoc --print-completion zsh > "$TMPDIR"/_texdoc texlua "$out"/bin/texdoc --print-completion zsh > "$TMPDIR"/_texdoc
substituteInPlace "$TMPDIR"/_texdoc \ substituteInPlace "$TMPDIR"/_texdoc \
--replace 'compdef __texdoc texdoc' '#compdef texdoc' \ --replace-fail 'compdef __texdoc texdoc' '#compdef texdoc' \
--replace '$(kpsewhich -var-value TEXMFROOT)/tlpkg/texlive.tlpdb' '$(kpsewhich Data.tlpdb.lua)' \ --replace-fail '$(kpsewhich -var-value TEXMFROOT)/tlpkg/texlive.tlpdb' '$(kpsewhich Data.tlpdb.lua)' \
--replace '/^name[^.]*$/ {print $2}' '/^ \["[^"]*"\] = {$/ { print substr($1,3,length($1)-4) }' --replace-fail '/^name[^.]*$/ {print $2}' '/^ \["[^"]*"\] = {$/ { print substr($1,3,length($1)-4) }'
echo '__texdoc' >> "$TMPDIR"/_texdoc echo '__texdoc' >> "$TMPDIR"/_texdoc
installShellCompletion --zsh "$TMPDIR"/_texdoc installShellCompletion --zsh "$TMPDIR"/_texdoc
''; '';
@ -410,7 +413,7 @@ in lib.recursiveUpdate orig rec {
# make tlmgr believe it can use kpsewhich to evaluate TEXMFROOT # make tlmgr believe it can use kpsewhich to evaluate TEXMFROOT
postFixup = '' postFixup = ''
substituteInPlace "$out"/bin/tlmgr \ substituteInPlace "$out"/bin/tlmgr \
--replace 'if (-r "$bindir/$kpsewhichname")' 'if (1)' --replace-fail 'if (-r "$bindir/$kpsewhichname")' 'if (1)'
sed -i '2i$ENV{PATH}='"'"'${lib.makeBinPath [ gnupg ]}'"'"' . ($ENV{PATH} ? ":$ENV{PATH}" : '"'''"');' "$out"/bin/tlmgr sed -i '2i$ENV{PATH}='"'"'${lib.makeBinPath [ gnupg ]}'"'"' . ($ENV{PATH} ? ":$ENV{PATH}" : '"'''"');' "$out"/bin/tlmgr
sed -i '2iPATH="${lib.makeBinPath [ coreutils gnused tl.kpathsea ]}''${PATH:+:$PATH}"' "$out"/bin/mktexlsr sed -i '2iPATH="${lib.makeBinPath [ coreutils gnused tl.kpathsea ]}''${PATH:+:$PATH}"' "$out"/bin/mktexlsr
''; '';

File diff suppressed because it is too large Load Diff