texlive: 2023-final -> 2024.20241027

This commit is contained in:
Dmitry Kalinkin 2024-10-27 21:29:19 -04:00
parent 0634959ae9
commit 7cd5f8cda0
7 changed files with 4456 additions and 3160 deletions

View File

@ -381,12 +381,12 @@ rec {
shortVersion = [ "devnag" "diadia" "pmxchords" "ptex2pdf" "simpdftex" "ttf2afm" ];
# (1) binaries requiring --help or -h
help = [ "arlatex" "bundledoc" "cachepic" "checklistings" "dvipos" "extractres" "fig4latex" "fragmaster"
"kpsewhere" "latex-git-log" "ltxfileinfo" "mendex" "perltex" "pn2pdf" "psbook" "psnup" "psresize" "purifyeps"
"kpsewhere" "latex-git-log" "ltxfileinfo" "mendex" "pdflatexpicscale" "perltex" "pn2pdf" "psbook" "psnup" "psresize" "purifyeps"
"simpdftex" "tex2xindy" "texluac" "texluajitc" "upmendex" "urlbst" "yplan" ];
shortHelp = [ "adhocfilelist" "authorindex" "bbl2bib" "bibdoiadd" "bibmradd" "biburl2doi" "bibzbladd" "ctanupload"
shortHelp = [ "adhocfilelist" "authorindex" "bbl2bib" "bibdoiadd" "bibmradd" "biburl2doi" "bibzbladd" "bookshelf-listallfonts" "bookshelf-mkfontsel" "ctanupload"
"disdvi" "dvibook" "dviconcat" "getmapdl" "latex2man" "listings-ext.sh" "pygmentex" ];
# (2) binaries that return non-zero exit code even if correctly asked for help
ignoreExitCode = [ "authorindex" "dvibook" "dviconcat" "dvipos" "extractres" "fig4latex" "fragmaster" "latex2man"
ignoreExitCode = [ "authorindex" "bookshelf-listallfonts" "bookshelf-mkfontsel" "dvibook" "dviconcat" "dvipos" "extractres" "fig4latex" "fragmaster" "latex2man"
"latex-git-log" "listings-ext.sh" "psbook" "psnup" "psresize" "purifyeps" "tex2xindy" "texluac"
"texluajitc" ];
# (2) binaries that print help on no argument, returning non-zero exit code

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fetchpatch, buildPackages
{ lib, stdenv, fetchurl, fetchFromGitHub, fetchpatch, buildPackages
, texlive
, zlib, libiconv, libpng, libX11
, freetype, ttfautohint, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
@ -38,12 +38,19 @@ let
binPackages = lib.getAttrs (corePackages ++ coreBigPackages) tlpdb;
common = {
src = fetchurl {
urls = [
"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${year}/texlive-${year}0313-source.tar.xz"
"ftp://tug.ctan.org/pub/tex/historic/systems/texlive/${year}/texlive-${year}0313-source.tar.xz"
];
hash = "sha256-OHiqDh7QMBwFOw4u5OmtmZxEE0X0iC55vdHI9M6eebk=";
# FIXME revert to official tarballs for TeX-Live 2025
#src = fetchurl {
# urls = [
# "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${year}/texlive-${year}0312-source.tar.xz"
# "ftp://tug.ctan.org/pub/tex/historic/systems/texlive/${year}/texlive-${year}0312-source.tar.xz"
# ];
# hash = "sha256-e22HzwFmFnD6xFyTEmvtl7mEMTntUQ+XXQR+qTi2/pY=";
#};
src = fetchFromGitHub {
owner = "TeX-Live";
repo = "texlive-source";
rev = "refs/tags/svn70897";
hash = "sha256-ZCoZAO0qGWPWW72BJOi5P7/A/qEm+SY3PQyLbx+e3pY=";
};
prePatch = ''
@ -123,15 +130,6 @@ core = stdenv.mkDerivation rec {
inherit (common) binToOutput src prePatch;
patches = [
(fetchpatch {
name = "ttfdump-CVE-2024-25262.patch";
url = "https://tug.org/svn/texlive/trunk/Build/source/texk/ttfdump/libttf/hdmx.c?r1=57915&r2=69520&view=patch";
stripLen = 2;
hash = "sha256-WH2kioqFAs3jaFmu4DdEUdrTf6eiymtiWTZi3vWwU7k=";
})
];
outputs = [ "out" "dev" "man" "info" ]
++ (builtins.map (builtins.replaceStrings [ "-" ] [ "_" ]) corePackages);
@ -221,19 +219,6 @@ core-big = stdenv.mkDerivation {
url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1009196;filename=lua_fixed_hash.patch;msg=45";
sha256 = "sha256-FTu1eRd3AUU7IRs2/7e7uwHuvZsrzTBPypbcEZkU7y4=";
})
# update to LuaTeX 1.16.1 to prepare for 1.17.0 below
(fetchpatch {
name = "luatex-1.16.1.patch";
url = "https://github.com/TeX-Live/texlive-source/commit/ad8702a45e317fa9d396ef4d50467c37964a9543.patch";
hash = "sha256-qfzUfkJUfW285w+fnbpO8JLArM7/uj3yb9PONgZrJLE=";
})
# fixes security issues in luatex that allows arbitrary code execution even with shell-escape disabled and network requests, see https://tug.org/~mseven/luatex.html
# fixed in LuaTeX 1.17.0, shipped as a rare binary update in TL 2023
(fetchpatch {
name = "luatex-1.17.0.patch";
url = "https://github.com/TeX-Live/texlive-source/commit/6ace460233115bd42b36e63c7ddce11cc92a1ebd.patch";
hash = "sha256-2fbIdwnw/XQXci9OqRrb6B5tHiSR0co08NyFgMyXCvc=";
})
# Fixes texluajitc crashes on aarch64, backport of the upstream fix
# https://github.com/LuaJIT/LuaJIT/commit/e9af1abec542e6f9851ff2368e7f196b6382a44c
# to the version vendored by texlive (2.1.0-beta3)
@ -322,15 +307,12 @@ chktex = stdenv.mkDerivation {
# for details see https://wiki.contextgarden.net/Building_LuaMetaTeX_for_TeX_Live
context = stdenv.mkDerivation rec {
pname = "luametatex";
version = "2.10.08";
version = "2.11.02";
src = fetchurl {
url = "https://tug.org/svn/texlive/trunk/Master/source/luametatex-${version}.tar.xz?pathrev=67034&view=co";
# keep the name the same, to avoid rebuilds now
name = "luametatex-${version}.tar.xz?revision=67034&view=co";
# when bumping the version this should probably be changed to:
# name = "luametatex-${version}.tar.xz";
hash = "sha256-3JeOUQ63jJOZWTxFCoyWjfcrspmdmC/yqgS1JaLfTWk=";
name = "luametatex-${version}.tar.xz";
url = "https://tug.org/svn/texlive/trunk/Master/source/luametatex-${version}.tar.xz?pathrev=70384&view=co";
hash = "sha256-o7esoBBTTYEstkd7l34BWxew3fIRdVcFiGxrT1/KP1o=";
};
enableParallelBuilding = true;
@ -437,20 +419,11 @@ asymptote = args.asymptote.overrideAttrs (finalAttrs: prevAttrs: {
# so that top level updates do not break texlive
src = fetchurl {
url = "mirror://sourceforge/asymptote/${finalAttrs.version}/asymptote-${finalAttrs.version}.src.tgz";
hash = "sha256-DecadD+m7pORuH3Sdcs/5M3vUbN6rhSkFoNN0Soq9bs=";
hash = "sha256-nZtcb6fg+848HlT+sl4tUdKMT+d5jyTHbNyugpGo6mY=";
};
texContainer = texlive.pkgs.asymptote.tex;
texdocContainer = texlive.pkgs.asymptote.texdoc;
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=";
})
];
});
inherit biber;

View File

@ -44,12 +44,12 @@ let
version = {
# day of the snapshot being taken
year = "2024";
month = "03";
day = "16";
month = "10";
day = "27";
# TeX Live version
texliveYear = 2023;
texliveYear = 2024;
# final (historic) release or snapshot
final = true;
final = false;
};
# The tarballs on CTAN mirrors for the current release are constantly
@ -75,11 +75,12 @@ let
];
tlpdbxz = fetchurl {
urls = map (up: "${up}/tlpkg/texlive.tlpdb.xz")
urls =
map (up: "${up}/tlpkg/texlive.tlpdb.xz")
# use last mirror for daily snapshots as texlive.tlpdb.xz changes every day
# TODO make this less hacky
(if version.final then mirrors else [ (lib.last mirrors) ]);
hash = "sha256-w+04GBFDk/P/XvW7T9PotGD0nQslMkV9codca2urNK4=";
hash = "sha256-jB9FXLpmqYluxdxGl67C50cx9dfN2S8LQwOow4OezcQ=";
};
tlpdbNix = runCommand "tlpdb.nix" {
@ -159,23 +160,15 @@ let
# The correctness of this collation is tested by tests.texlive.licenses
licenses = with lib.licenses; {
scheme-basic = [ free gfl gpl1Only gpl2Only gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ];
scheme-bookpub = [ artistic2 asl20 bsd3 fdl13Only free gfl gpl1Only gpl2Only gpl2Plus knuth lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain ];
scheme-context = [ bsd2 bsd3 cc-by-sa-40 free gfl gfsl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus knuth lgpl2 lgpl21
lppl1 lppl13c mit ofl publicDomain x11 ];
scheme-full = [ artistic1-cl8 artistic2 asl20 bsd2 bsd3 bsdOriginal cc-by-10 cc-by-20 cc-by-30 cc-by-40 cc-by-sa-10 cc-by-sa-20 cc-by-sa-30
cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit
ofl publicDomain x11 ];
scheme-gust = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2Only
gpl2Plus gpl3Only gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-bookpub = [ artistic2 asl20 bsd3 fdl13Only free gfl gpl1Only gpl2Only gpl2Plus knuth lgpl21 lppl1 lppl12 lppl13c mit ofl publicDomain ];
scheme-context = [ bsd2 bsd3 cc-by-sa-40 eupl12 free gfl gfsl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl13c mit ofl publicDomain x11 ];
scheme-full = [ artistic1-cl8 artistic2 asl20 bsd2 bsd3 bsdOriginal cc-by-10 cc-by-20 cc-by-30 cc-by-40 cc-by-sa-10 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 eupl12 fdl13Only free gfl gfsl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-gust = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-40 cc0 eupl12 fdl13Only free gfl gfsl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-infraonly = [ gpl2Plus lgpl21 ];
scheme-medium = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 fdl13Only
free gfl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl
publicDomain x11 ];
scheme-medium = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 eupl12 fdl13Only free gfl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-minimal = [ free gpl1Only gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ];
scheme-small = [ asl20 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus knuth
lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-tetex = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-30 cc-by-40 cc-by-sa-10 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 fdl13Only free gfl gpl1Only
gpl2Only gpl2Plus gpl3Only gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-small = [ asl20 cc-by-40 cc-by-sa-40 cc0 eupl12 fdl13Only free gfl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-tetex = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-30 cc-by-40 cc-by-sa-10 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 eupl12 fdl13Only free gfl gpl1Only gpl2Only gpl2Plus gpl3Only gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
};
meta = {

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,7 @@ $a}
s/"bsd"/"bsd3"/g # license text does not match exactly, but is pretty close
s/"bsd4"/"bsdOriginal"/g
s/"collection"/"free"/g # used for collections of individual packages with distinct licenses. As TeXlive only contains free software, we can use "free" as a catchall
s/"eupl"/"eupl12"/g
s/"fdl"/"fdl13Only"/g
s/"gpl"/"gpl1Only"/g
s/"gpl([1-3])"/"gpl\1Only"/g
@ -65,6 +66,7 @@ $a}
s/"lppl1\.3a"/"lppl13a"/g
s/"lppl1\.3c"/"lppl13c"/g
s/"other-free"/"free"/g
s/"other-nonfree"/"unfree"/g
s/"opl"/"opubl"/g
s/"pd"/"publicDomain"/g

View File

@ -26,8 +26,7 @@ in lib.recursiveUpdate orig rec {
#### overrides of texlive.tlpdb
#### nonstandard script folders
context.scriptsFolder = "context/stubs-mkiv/unix";
context-legacy.scriptsFolder = "context/stubs/unix";
context-texlive.scriptsFolder = "context-texlive/stubs-mkiv/unix";
cyrillic-bin.scriptsFolder = "texlive-extra";
fontinst.scriptsFolder = "texlive-extra";
mptopdf.scriptsFolder = "context/perl";
@ -53,10 +52,13 @@ in lib.recursiveUpdate orig rec {
latex-git-log.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ IPCSystemSimple ])) ];
latexindent.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ FileHomeDir LogDispatch LogLog4perl UnicodeLineBreak YAMLTiny ])) ];
pax.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ FileWhich ])) ];
pdflatexpicscale.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ GD ImageExifTool ])) ];
ptex-fontmaps.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ Tk ])) ];
purifyeps.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ FileWhich ])) ];
sqltex.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ DBI ])) ];
svn-multi.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ TimeDate ])) ];
texdoctk.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ Tk ])) ];
typog.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ IPCSystemSimple ])) ];
ulqda.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ DigestSHA1 ])) ];
#### python packages
@ -67,8 +69,6 @@ in lib.recursiveUpdate orig rec {
bibexport.extraBuildInputs = [ gnugrep ];
checklistings.extraBuildInputs = [ coreutils ];
cjk-gs-integrate.extraBuildInputs = [ ghostscript_headless ];
context.extraBuildInputs = [ coreutils ];
context-legacy.extraBuildInputs = [ ruby ];
cyrillic-bin.extraBuildInputs = [ coreutils gnused ];
dtxgen.extraBuildInputs = [ coreutils getopt gnumake zip ];
dviljk.extraBuildInputs = [ coreutils ];
@ -126,6 +126,11 @@ in lib.recursiveUpdate orig rec {
"mtxrun.lua" = tl.context.tex + "/scripts/context/lua/mtxrun.lua";
};
context-legacy.binlinks = {
texexec = tl.context-legacy.tex + "/scripts/context/ruby/texexec.rb";
texmfstart = tl.context-legacy.tex + "/scripts/context/ruby/texmfstart.rb";
};
epstopdf.binlinks.repstopdf = "epstopdf";
pdfcrop.binlinks.rpdfcrop = "pdfcrop";
@ -170,14 +175,6 @@ in lib.recursiveUpdate orig rec {
sed -i '2i$ENV{PATH}='"'"'${lib.makeBinPath cjk-gs-integrate.extraBuildInputs}'"'"' . ($ENV{PATH} ? ":$ENV{PATH}" : '"'''"');' "$out"/bin/cjk-gs-integrate
'';
context.postFixup = ''
sed -i '2iPATH="${lib.makeBinPath context.extraBuildInputs}''${PATH:+:$PATH}"' "$out"/bin/{contextjit,mtxrunjit}
'';
context-legacy.postFixup = ''
sed -i '2iPATH="${lib.makeBinPath context-legacy.extraBuildInputs}''${PATH:+:$PATH}"' "$out"/bin/texexec
'';
cyrillic-bin.postFixup = ''
sed -i '2iPATH="${lib.makeBinPath cyrillic-bin.extraBuildInputs}''${PATH:+:$PATH}"' "$out"/bin/rumakeindex
'';
@ -308,6 +305,11 @@ in lib.recursiveUpdate orig rec {
substituteInPlace "$out"/bin/latexindent --replace-fail 'use FindBin;' "BEGIN { \$0 = '$scriptsFolder' . '/latexindent.pl'; }; use FindBin;"
'';
# find files in script directory, not in binary directory
minted.postFixup = ''
substituteInPlace "$out"/bin/latexminted --replace-fail "__file__" "\"$scriptsFolder/latexminted.py\""
'';
# flag lua dependency
texblend.scriptExts = [ "lua" ];
@ -339,6 +341,8 @@ in lib.recursiveUpdate orig rec {
# it seems to need it to transform fonts
xdvi.deps = (orig.xdvi.deps or [ ]) ++ [ "metafont" ];
mltex.deps = (orig.mltex.deps or [ ]) ++ [ "pdftex" ];
# remove dependency-heavy packages from the basic collections
collection-basic.deps = lib.subtractLists [ "metafont" "xdvi" ] orig.collection-basic.deps;
@ -353,8 +357,8 @@ in lib.recursiveUpdate orig rec {
(!(stdenv.hostPlatform.isPower && stdenv.hostPlatform.is64bit) && !stdenv.hostPlatform.isRiscV)
orig.luajittex.binfiles;
# tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README
arabi-add.license = [ "lppl13c" ];
# osda is unfree. Hence, we can't include it by default
collection-publishers.deps = builtins.filter (dep: dep != "osda") orig.collection-publishers.deps;
texdoc = {
extraRevision = "-tlpdb${toString tlpdbVersion.revision}";

File diff suppressed because it is too large Load Diff