texlive: 2022-final -> 2023.20240114

Co-authored-by: apfelkuchen06 <apfelkuchen@hrnz.li>
This commit is contained in:
Vincenzo Mantova 2024-01-14 18:51:07 +00:00
parent 4c6e59f0f8
commit 253025b370
11 changed files with 5607 additions and 4147 deletions

View file

@ -70,7 +70,10 @@ rec {
\end{document} \end{document}
''; '';
} '' } ''
chktex -v -nall -w1 "$input" 2>&1 | tee "$out" # chktex is supposed to return 2 when it (successfully) finds warnings, but no errors,
# see http://git.savannah.nongnu.org/cgit/chktex.git/commit/?id=ec0fb9b58f02a62ff0bfec98b997208e9d7a5998
(set +e; chktex -v -nall -w1 "$input" 2>&1; [ $? = 2 ] || exit 1; set -e) | tee "$out"
# also check that the output does indeed contain "One warning printed"
grep "One warning printed" "$out" grep "One warning printed" "$out"
''; '';
@ -427,6 +430,12 @@ rec {
# crossrefware: require bibtexperllibs under TEXMFROOT # crossrefware: require bibtexperllibs under TEXMFROOT
"bbl2bib" "bibdoiadd" "bibmradd" "biburl2doi" "bibzbladd" "checkcites" "ltx2crossrefxml" "bbl2bib" "bibdoiadd" "bibmradd" "biburl2doi" "bibzbladd" "checkcites" "ltx2crossrefxml"
# epstopdf: requires kpsewhich
"epstopdf" "repstopdf"
# requires kpsewhich
"memoize-extract.pl" "memoize-extract.py"
# require other texlive binaries in PATH # require other texlive binaries in PATH
"allcm" "allec" "chkweb" "fontinst" "ht*" "installfont-tl" "kanji-config-updmap-sys" "kanji-config-updmap-user" "allcm" "allec" "chkweb" "fontinst" "ht*" "installfont-tl" "kanji-config-updmap-sys" "kanji-config-updmap-user"
"kpse*" "latexfileversion" "mkocp" "mkofm" "mtxrunjit" "pdftex-quiet" "pslatex" "rumakeindex" "texconfig" "kpse*" "latexfileversion" "mkocp" "mkofm" "mtxrunjit" "pdftex-quiet" "pslatex" "rumakeindex" "texconfig"
@ -434,7 +443,7 @@ rec {
# misc luatex binaries searching for luatex in PATH # misc luatex binaries searching for luatex in PATH
"citeproc-lua" "context" "contextjit" "ctanbib" "digestif" "epspdf" "l3build" "luafindfont" "luaotfload-tool" "citeproc-lua" "context" "contextjit" "ctanbib" "digestif" "epspdf" "l3build" "luafindfont" "luaotfload-tool"
"luatools" "make4ht" "pmxchords" "tex4ebook" "texdoc" "texlogsieve" "xindex" "luatools" "make4ht" "pmxchords" "tex4ebook" "texblend" "texdoc" "texfindpkg" "texlogsieve" "xindex"
# requires full TEXMFROOT (e.g. for config) # requires full TEXMFROOT (e.g. for config)
"mktexfmt" "mktexmf" "mktexpk" "mktextfm" "psnup" "psresize" "pstops" "tlmgr" "updmap" "webquiz" "mktexfmt" "mktexmf" "mktexpk" "mktextfm" "psnup" "psresize" "pstops" "tlmgr" "updmap" "webquiz"
@ -513,6 +522,13 @@ rec {
args= args=
ignoreExitCode= ignoreExitCode=
binCount=$((binCount + 1)) binCount=$((binCount + 1))
# ignore non-executable files (such as context.lua)
if [[ ! -x "$bin" ]] ; then
ignoredCount=$((ignoredCount + 1))
continue
fi
case "$base" in case "$base" in
${lib.concatStringsSep "|" ignored}) ${lib.concatStringsSep "|" ignored})
ignoredCount=$((ignoredCount + 1)) ignoredCount=$((ignoredCount + 1))
@ -585,6 +601,7 @@ rec {
(pkg: '' (pkg: ''
for bin in '${pkg.outPath}'/bin/* ; do for bin in '${pkg.outPath}'/bin/* ; do
grep -I -q . "$bin" || continue # ignore binary files grep -I -q . "$bin" || continue # ignore binary files
[[ -x "$bin" ]] || continue # ignore non-executable files (such as context.lua)
scriptCount=$((scriptCount + 1)) scriptCount=$((scriptCount + 1))
read -r cmdline < "$bin" read -r cmdline < "$bin"
read -r interp <<< "$cmdline" read -r interp <<< "$cmdline"

View file

@ -72,6 +72,13 @@ CTAN and the various mirrors) and that the build recipe continues to produce
the same output. Should those assumptions not hold, remove the previous fixed the same output. Should those assumptions not hold, remove the previous fixed
hashes for the relevant package, or for all packages. hashes for the relevant package, or for all packages.
### Upgrading the ConTeXt binaries
The LuaMetaTeX sources required for ConTeXt are distributed separately from the
TeX Live tarballs and must be updated manually (see `texlive.bin.context`). You
must use the latest tarball at https://tug.org/svn/texlive/trunk/Master/source/
whose revision number is less than or equal to that of the package `context`.
### Updating the licensing information ### Updating the licensing information
The license of each package in texlive is automatically extracted from texlive's The license of each package in texlive is automatically extracted from texlive's

View file

@ -2,8 +2,8 @@
, texlive , texlive
, zlib, libiconv, libpng, libX11 , zlib, libiconv, libpng, libX11
, freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext , freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
, perl, perlPackages, python3Packages, pkg-config , perl, perlPackages, python3Packages, pkg-config, cmake, ninja
, libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr , libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr, mupdf
, brotli, cairo, pixman, xorg, clisp, biber, woff2, xxHash , brotli, cairo, pixman, xorg, clisp, biber, woff2, xxHash
, makeWrapper, shortenPerlShebang, useFixedHashes, asymptote , makeWrapper, shortenPerlShebang, useFixedHashes, asymptote
, biber-ms , biber-ms
@ -34,16 +34,16 @@ let
"tex4ht" "texlive-scripts-extra" "texware" "tie" "tpic2pdftex" "ttfutils" "tex4ht" "texlive-scripts-extra" "texware" "tie" "tpic2pdftex" "ttfutils"
"uptex" "velthuis" "vlna" "web" "xml2pmx" ]; "uptex" "velthuis" "vlna" "web" "xml2pmx" ];
coreBigPackages = [ "metafont" "mflua" "metapost" "luatex" "luahbtex" coreBigPackages = [ "metafont" "mflua" "metapost" "luatex" "luahbtex"
"xetex" ] ++ lib.optional withLuaJIT "luajittex"; "upmendex" "xetex" ] ++ lib.optional withLuaJIT "luajittex";
binPackages = lib.getAttrs (corePackages ++ coreBigPackages) tlpdb; binPackages = lib.getAttrs (corePackages ++ coreBigPackages) tlpdb;
common = { common = {
src = fetchurl { src = fetchurl {
urls = [ urls = [
"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${year}/texlive-${year}0321-source.tar.xz" "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}0321-source.tar.xz" "ftp://tug.ctan.org/pub/tex/historic/systems/texlive/${year}/texlive-${year}0313-source.tar.xz"
]; ];
hash = "sha256-X/o0heUessRJBJZFD8abnXvXy55TNX2S20vNT9YXm1Y="; hash = "sha256-OHiqDh7QMBwFOw4u5OmtmZxEE0X0iC55vdHI9M6eebk=";
}; };
prePatch = '' prePatch = ''
@ -141,12 +141,6 @@ core = stdenv.mkDerivation rec {
perl perl
]; ];
patches = [
# Fix implicit `int` on `main`, which results in an error when building with clang 16.
# This is fixed upstream and can be dropped with the 2023 release.
./fix-implicit-int.patch
];
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
preConfigure = '' preConfigure = ''
@ -211,20 +205,19 @@ core-big = stdenv.mkDerivation {
inherit (common) binToOutput src prePatch; inherit (common) binToOutput src prePatch;
patches = [ patches = [
# improves reproducibility of fmt files. This patch has been proposed upstream, # improves reproducibility of fmt files
# but they are considering some other approaches as well. This is fairly # see discussion at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009196
# conservative so we can safely apply it until they make a decision
# https://mailman.ntg.nl/pipermail/dev-luatex/2022-April/006650.html
(fetchpatch { (fetchpatch {
name = "reproducible_exception_strings.patch"; name = "lua_fixed_hash.patch";
url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1009196;filename=reproducible_exception_strings.patch;msg=5"; url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1009196;filename=lua_fixed_hash.patch;msg=45";
sha256 = "sha256-RNZoEeTcWnrLaltcYrhNIORh42fFdwMzBfxMRWVurbk="; sha256 = "sha256-FTu1eRd3AUU7IRs2/7e7uwHuvZsrzTBPypbcEZkU7y4=";
}) })
# fixes a security-issue in luatex that allows arbitrary code execution even with shell-escape disabled, see https://tug.org/~mseven/luatex.html # fixes a security-issue in luatex that allows arbitrary code execution even with shell-escape disabled, see https://tug.org/~mseven/luatex.html
# fixed in LuaTeX 1.17.0, remove patch when upgrading to TL 2024
(fetchpatch { (fetchpatch {
name = "CVE-2023-32700.patch"; name = "CVE-2023-32700.patch";
url = "https://tug.org/~mseven/luatex-files/2022/patch"; url = "https://tug.org/~mseven/luatex-files/2023/patch";
hash = "sha256-o9ENLc1ZIIOMX6MdwpBIgrR/Jdw6tYLmAyzW8i/FUbY="; hash = "sha256-AvMedFkZJAFsCJ51eQqBQM4MpzLzn+GeBrzuTzISVkk=";
excludes = [ "build.sh" ]; excludes = [ "build.sh" ];
stripLen = 1; stripLen = 1;
}) })
@ -238,15 +231,12 @@ core-big = stdenv.mkDerivation {
stripLen = 1; stripLen = 1;
extraPrefix = "libs/luajit/LuaJIT-src/"; extraPrefix = "libs/luajit/LuaJIT-src/";
}) })
# Fix implicit `int` on `main`, which results in an error when building with clang 16.
# This is fixed upstream and can be dropped with the 2023 release.
./fix-implicit-int.patch
]; ];
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
inherit (core) nativeBuildInputs depsBuildBuild; inherit (core) nativeBuildInputs depsBuildBuild;
buildInputs = core.buildInputs ++ [ core cairo harfbuzz icu graphite2 libX11 ]; buildInputs = core.buildInputs ++ [ core cairo harfbuzz icu graphite2 libX11 potrace ];
/* deleting the unused packages speeds up configure by a considerable margin /* deleting the unused packages speeds up configure by a considerable margin
and ensures we do not rebuild existing libraries by mistake */ and ensures we do not rebuild existing libraries by mistake */
@ -293,7 +283,7 @@ core-big = stdenv.mkDerivation {
chktex = stdenv.mkDerivation { chktex = stdenv.mkDerivation {
pname = "texlive-chktex.bin"; pname = "texlive-chktex.bin";
inherit version; inherit (texlive.pkgs.chktex) version;
inherit (common) src; inherit (common) src;
@ -309,38 +299,69 @@ chktex = stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
}; };
# the LuaMetaTeX engine (distributed since TeX Live 2023) must be built separately
# the sources used by TL are stored in the source TL repo
# for details see https://wiki.contextgarden.net/Building_LuaMetaTeX_for_TeX_Live
context = stdenv.mkDerivation rec {
pname = "texlive-context.bin";
version = "2.10.08";
src = fetchurl {
url = "https://tug.org/svn/texlive/trunk/Master/source/luametatex-${version}.tar.xz?revision=67034&view=co";
hash = "sha256-3JeOUQ63jJOZWTxFCoyWjfcrspmdmC/yqgS1JaLfTWk=";
};
enableParallelBuilding = true;
nativeBuildInputs = [ cmake ninja ];
meta = with lib; {
description = "The LUAMETATEX engine is a follow up on LUATEX and is again part of CONTEXT development";
homepage = "https://www.pragma-ade.nl/luametatex-1.htm";
license = licenses.gpl2Plus;
maintainers = with lib.maintainers; [ apfelkuchen6 xworld21 ];
};
};
dvisvgm = stdenv.mkDerivation { dvisvgm = stdenv.mkDerivation {
pname = "texlive-dvisvgm.bin"; pname = "texlive-dvisvgm.bin";
inherit version; inherit (texlive.pkgs.dvisvgm) version;
inherit (common) src; inherit (common) src;
patches = [ patches = [
# do not use deprecated NEWPDF option with Ghostscript >= 10.02.0
# https://github.com/mgieseki/dvisvgm/issues/245
(fetchpatch { (fetchpatch {
url = "https://github.com/mgieseki/dvisvgm/commit/629544928877362d0c6d64f20695f7df3073c5eb.patch"; name = "dont-use-NEWPDF-with-GS-10.02.0.patch";
url = "https://github.com/mgieseki/dvisvgm/commit/f31cdf14d73f586e2b92b4b0891d097a90274a0b.patch";
hash = "sha256-Yf/GhmJYM87M0ITZ/+7q2ZvSYnac4N2/NkTkFlJ2VII=";
stripLen = 1; stripLen = 1;
extraPrefix = "texk/dvisvgm/dvisvgm-src/"; extraPrefix = "texk/dvisvgm/dvisvgm-src/";
hash = "sha256-CBCbc/woaFeLw7aBG/kSVYc3a5Q56zbAB64kK6mRy4g=";
})
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/mgieseki/dvisvgm/commit/d5df85b403602c927fe56a1f692af91182a1facd.patch";
stripLen = 1;
extraPrefix = "texk/dvisvgm/dvisvgm-src/";
hash = "sha256-U5m9jPmfAXOQKaU+aO/h6hEAzHRPqKcdj5k8f5gU9JQ=";
excludes = [ "texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.hpp" ];
}) })
]; ];
# since we are running configure directly in texk/dvisvgm,
# the option --with-system-potrace is not picked up properly
# and dvisvgm tries to build a vendored copy of potrace
postPatch = ''
cat > texk/dvisvgm/dvisvgm-src/libs/potrace/Makefile <<EOF
all:
install:
EOF
'' +
# PDF handling requires mutool (from mupdf) since Ghostscript 10.01
''
substituteInPlace texk/dvisvgm/dvisvgm-src/src/PDFHandler.cpp \
--replace 'Process("mutool"' "Process(\"$(PATH="$HOST_PATH" command -v mutool)\""
'';
preConfigure = "cd texk/dvisvgm"; preConfigure = "cd texk/dvisvgm";
configureFlags = common.configureFlags configureFlags = common.configureFlags
++ [ "--with-system-kpathsea" ]; ++ [ "--with-system-kpathsea" ];
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ core brotli ghostscript zlib freetype woff2 potrace xxHash ]; buildInputs = [ core brotli ghostscript zlib freetype woff2 potrace xxHash mupdf ];
enableParallelBuilding = true; enableParallelBuilding = true;
}; };
@ -348,7 +369,7 @@ dvisvgm = stdenv.mkDerivation {
dvipng = stdenv.mkDerivation { dvipng = stdenv.mkDerivation {
pname = "texlive-dvipng.bin"; pname = "texlive-dvipng.bin";
inherit version; inherit (texlive.pkgs.dvipng) version;
inherit (common) src; inherit (common) src;
@ -412,7 +433,7 @@ inherit biber-ms;
bibtexu = bibtex8; bibtexu = bibtex8;
bibtex8 = stdenv.mkDerivation { bibtex8 = stdenv.mkDerivation {
pname = "texlive-bibtex-x.bin"; pname = "texlive-bibtex-x.bin";
inherit version; inherit (texlive.pkgs.bibtexu) version;
inherit (common) src; inherit (common) src;
@ -430,7 +451,7 @@ bibtex8 = stdenv.mkDerivation {
xdvi = stdenv.mkDerivation { xdvi = stdenv.mkDerivation {
pname = "texlive-xdvi.bin"; pname = "texlive-xdvi.bin";
inherit version; inherit (texlive.pkgs.xdvi) version;
inherit (common) src; inherit (common) src;
@ -472,7 +493,7 @@ xpdfopen = stdenv.mkDerivation {
xindy = stdenv.mkDerivation { xindy = stdenv.mkDerivation {
pname = "texlive-xindy.bin"; pname = "texlive-xindy.bin";
inherit version; inherit (texlive.pkgs.xindy) version;
inherit (common) src; inherit (common) src;

View file

@ -266,6 +266,9 @@ let
target="$(readlink "$link")" target="$(readlink "$link")"
fi fi
# skip non-executable files (such as context.lua)
if [[ ! -x "$target" ]] ; then continue ; fi
rm "$link" rm "$link"
makeWrapper "$target" "$link" \ makeWrapper "$target" "$link" \
--inherit-argv0 \ --inherit-argv0 \
@ -370,8 +373,17 @@ let
# generate format links (reads fmtutil.cnf to know which ones) *after* the wrappers have been generated # generate format links (reads fmtutil.cnf to know which ones) *after* the wrappers have been generated
'' ''
texlinks --quiet "$out/bin" texlinks --quiet "$out/bin"
'' +
# temporarily patch mtxrun.lua to generate uuid's deterministically from SOURCE_DATE_EPOCH
''
if [[ -e "$out/bin/mtxrun" ]]; then
mv "$out"/bin/mtxrun.lua{,.orig}
substitute "$TEXMFDIST"/scripts/context/lua/mtxrun.lua "$out"/bin/mtxrun.lua \
--replace 'randomseed(math.initialseed)' "randomseed($SOURCE_DATE_EPOCH)"
fi
'' + '' +
# texlive postactions (see TeXLive::TLUtils::_do_postaction_script) # texlive postactions (see TeXLive::TLUtils::_do_postaction_script)
# this step includes generating the ConTeXt file databases since TL 2023
(lib.concatMapStrings (pkg: '' (lib.concatMapStrings (pkg: ''
postaction='${pkg.postactionScript}' postaction='${pkg.postactionScript}'
case "$postaction" in case "$postaction" in
@ -380,9 +392,16 @@ let
*) postInterp= ;; *) postInterp= ;;
esac esac
echo "postaction install script for ${pkg.pname}: ''${postInterp:+$postInterp }$postaction install $TEXMFROOT" echo "postaction install script for ${pkg.pname}: ''${postInterp:+$postInterp }$postaction install $TEXMFROOT"
$postInterp "$TEXMFROOT/$postaction" install "$TEXMFROOT" FORCE_SOURCE_DATE=1 TZ= $postInterp "$TEXMFROOT"/$postaction install "$TEXMFROOT"
'') (lib.filter (pkg: pkg ? postactionScript) pkgList.tlpkg)) + '') (lib.filter (pkg: pkg ? postactionScript) pkgList.tlpkg)) +
# restore the original mtxrun.lua
''
if [[ -e "$out/bin/mtxrun" ]]; then
mv "$out"/bin/mtxrun.lua{.orig,}
fi
'' +
# generate formats # generate formats
# TODO generate ConTeXt formats (based on fmtutil.cnf?)
'' ''
# many formats still ignore SOURCE_DATE_EPOCH even when FORCE_SOURCE_DATE=1 # many formats still ignore SOURCE_DATE_EPOCH even when FORCE_SOURCE_DATE=1
# libfaketime fixes non-determinism related to timestamps ignoring FORCE_SOURCE_DATE # libfaketime fixes non-determinism related to timestamps ignoring FORCE_SOURCE_DATE
@ -408,21 +427,6 @@ let
'' ''
rm "$out"/bin/*-sys rm "$out"/bin/*-sys
'' + '' +
# TODO: a context trigger https://www.preining.info/blog/2015/06/debian-tex-live-2015-the-new-layout/
# http://wiki.contextgarden.net/ConTeXt_Standalone#Unix-like_platforms_.28Linux.2FMacOS_X.2FFreeBSD.2FSolaris.29
# MkIV uses its own lookup mechanism and we need to initialize
# caches for it.
# We use faketime to fix the embedded timestamps and patch the uuids
# with some random but constant values.
''
if [[ -e "$out/bin/mtxrun" ]]; then
substitute "$TEXMFDIST"/scripts/context/lua/mtxrun.lua mtxrun.lua \
--replace 'cache_uuid=osuuid()' 'cache_uuid="e2402e51-133d-4c73-a278-006ea4ed734f"' \
--replace 'uuid=osuuid(),' 'uuid="242be807-d17e-4792-8e39-aa93326fc871",'
FORCE_SOURCE_DATE=1 TZ= faketime -f '@1980-01-01 00:00:00 x0.001' luatex --luaonly mtxrun.lua --generate
fi
'' +
# Get rid of all log files. They are not needed, but take up space # Get rid of all log files. They are not needed, but take up space
# and render the build unreproducible by their embedded timestamps # and render the build unreproducible by their embedded timestamps
# and other non-deterministic diagnostics. # and other non-deterministic diagnostics.

View file

@ -168,7 +168,7 @@ let
++ (lib.attrVals (args.scriptExts or [ ]) extToInput); ++ (lib.attrVals (args.scriptExts or [ ]) extToInput);
nativeBuildInputs = extraNativeBuildInputs; nativeBuildInputs = extraNativeBuildInputs;
# absolute scripts folder # absolute scripts folder
scriptsFolder = lib.optionalString (tex ? outPath) (tex.outPath + "/scripts/" + args.scriptsFolder or pname); scriptsFolder = lib.optionals (tex ? outPath) (builtins.map (f: tex.outPath + "/scripts/" + f) (lib.toList args.scriptsFolder or pname));
# binaries info # binaries info
inherit (args) binfiles; inherit (args) binfiles;
binlinks = builtins.attrNames (args.binlinks or { }); binlinks = builtins.attrNames (args.binlinks or { });

View file

@ -43,13 +43,13 @@ let
version = { version = {
# day of the snapshot being taken # day of the snapshot being taken
year = "2023"; year = "2024";
month = "03"; month = "01";
day = "19"; day = "14";
# TeX Live version # TeX Live version
texliveYear = 2022; texliveYear = 2023;
# final (historic) release or snapshot # final (historic) release or snapshot
final = true; final = false;
}; };
# The tarballs on CTAN mirrors for the current release are constantly # The tarballs on CTAN mirrors for the current release are constantly
@ -63,16 +63,23 @@ let
"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${toString texliveYear}/tlnet-final" "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${toString texliveYear}/tlnet-final"
"ftp://tug.org/texlive/historic/${toString texliveYear}/tlnet-final" "ftp://tug.org/texlive/historic/${toString texliveYear}/tlnet-final"
] ++ [ ] ++ [
# CTAN mirrors
"https://mirror.ctan.org/systems/texlive/tlnet"
# daily snapshots hosted by one of the texlive release managers; # daily snapshots hosted by one of the texlive release managers;
# used for non-final snapshots and as fallback for final snapshots that have not reached yet the historic mirrors # used for packages that in the meanwhile have been updated or removed from CTAN
# please note that this server is not meant for large scale deployment and should be avoided on release branches # and for packages that have not reached yet the historic mirrors
# please note that this server is not meant for large scale deployment
# https://tug.org/pipermail/tex-live/2019-November/044456.html # https://tug.org/pipermail/tex-live/2019-November/044456.html
# https://texlive.info/ MUST appear last (see tlpdbxz)
"https://texlive.info/tlnet-archive/${year}/${month}/${day}/tlnet" "https://texlive.info/tlnet-archive/${year}/${month}/${day}/tlnet"
]; ];
tlpdbxz = fetchurl { tlpdbxz = fetchurl {
urls = map (up: "${up}/tlpkg/texlive.tlpdb.xz") mirrors; urls = map (up: "${up}/tlpkg/texlive.tlpdb.xz")
hash = "sha256-vm7DmkH/h183pN+qt1p1wZ6peT2TcMk/ae0nCXsCoMw="; # 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-eUG0KVfFPkjOczCsu2GAPRQcvcPrEIGqIsJNRc+AHDs=";
}; };
tlpdbNix = runCommand "tlpdb.nix" { tlpdbNix = runCommand "tlpdb.nix" {
@ -152,12 +159,12 @@ let
# The correctness of this collation is tested by tests.texlive.licenses # The correctness of this collation is tested by tests.texlive.licenses
licenses = with lib.licenses; { licenses = with lib.licenses; {
scheme-basic = [ free gfl gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ]; scheme-basic = [ free gfl gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ];
scheme-bookpub = [ artistic2 asl20 fdl13Only free gfl gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain ]; scheme-bookpub = [ artistic2 asl20 bsd3 fdl13Only free gfl gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain ];
scheme-context = [ bsd2 bsd3 cc-by-sa-40 free gfl gfsl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21 scheme-context = [ bsd2 bsd3 cc-by-sa-40 free gfl gfsl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21
lppl1 lppl13c mit ofl publicDomain x11 ]; lppl1 lppl13c mit ofl publicDomain x11 ];
scheme-full = [ artistic1-cl8 artistic2 asl20 bsd2 bsd3 bsdOriginal cc-by-10 cc-by-40 cc-by-sa-10 cc-by-sa-20 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-30 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus isc knuth cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit
lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ]; ofl publicDomain x11 ];
scheme-gust = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2 scheme-gust = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2
gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ]; gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-infraonly = [ gpl2 gpl2Plus lgpl21 ]; scheme-infraonly = [ gpl2 gpl2Plus lgpl21 ];
@ -167,9 +174,8 @@ let
scheme-minimal = [ free gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ]; scheme-minimal = [ free gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ];
scheme-small = [ asl20 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth scheme-small = [ asl20 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth
lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ]; lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
scheme-tetex = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-10 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 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
fdl13Only free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a gpl2 gpl2Plus gpl3 gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
lppl13c mit ofl publicDomain x11];
}; };
meta = { meta = {

View file

@ -1,22 +0,0 @@
diff -ur a/utils/m-tx/mtx-src/prepmx.c b/utils/m-tx/mtx-src/prepmx.c
--- a/utils/m-tx/mtx-src/prepmx.c 2018-04-28 17:56:18.000000000 -0600
+++ b/utils/m-tx/mtx-src/prepmx.c 2023-07-11 15:21:26.351024424 -0600
@@ -769,6 +769,7 @@
}
+int
main(int argc, Char *argv[])
{ /* ---- Main program ------------------------ */
PASCAL_MAIN(argc, argv);
diff -ur a/utils/pmx/pmx-src/libf2c/main.c b/utils/pmx/pmx-src/libf2c/main.c
--- a/utils/pmx/pmx-src/libf2c/main.c 2016-02-09 22:31:26.000000000 -0700
+++ b/utils/pmx/pmx-src/libf2c/main.c 2023-07-11 15:49:35.043438384 -0600
@@ -106,6 +106,7 @@
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
+int
main(int argc, char **argv)
#endif
{

File diff suppressed because it is too large Load diff

View file

@ -30,18 +30,18 @@ for binname in $binfiles ; do
# look for scripts # look for scripts
# the explicit list of extensions avoid non-scripts such as $binname.cmd, $binname.jar, $binname.pm # the explicit list of extensions avoid non-scripts such as $binname.cmd, $binname.jar, $binname.pm
# the order is relevant: $binname.sh is preferred to other $binname.* # the order is relevant: $binname.sh is preferred to other $binname.*
if [[ -n "$scriptsFolder" ]] ; then for folder in $scriptsFolder ; do
for script in "$scriptsFolder/$binname"{,.sh,.lua,.pl,.py,.rb,.sno,.tcl,.texlua,.tlu}; do for script in "$folder/$binname"{,.sh,.lua,.pl,.py,.rb,.sno,.tcl,.texlua,.tlu}; do
if [[ -f "$script" ]] ; then if [[ -f "$script" ]] ; then
sed -f patch-scripts.sed \ sed -f patch-scripts.sed \
-e 's/^scriptname=`basename "\$0"`$/'"scriptname='$(basename "$binname")'/" \ -e 's/^scriptname=`basename "\$0"`$/'"scriptname='$(basename "$binname")'/" \
-e 's/^scriptname=`basename "\$0" .sh`$'"/scriptname='$(basename "$binname" .sh)'/" \ -e 's/^scriptname=`basename "\$0" .sh`$'"/scriptname='$(basename "$binname" .sh)'/" \
"$script" > "$output" "$script" > "$output"
chmod +x "$output" chmod +x "$output"
continue 2 continue 3
fi fi
done done
fi done
echo "error: could not find source for 'bin/$binname'" >&2 echo "error: could not find source for 'bin/$binname'" >&2
exit 1 exit 1

View file

@ -26,7 +26,8 @@ in lib.recursiveUpdate orig rec {
#### overrides of texlive.tlpdb #### overrides of texlive.tlpdb
#### nonstandard script folders #### nonstandard script folders
context.scriptsFolder = "context/stubs/unix"; context.scriptsFolder = "context/stubs-mkiv/unix";
context-legacy.scriptsFolder = "context/stubs/unix";
cyrillic-bin.scriptsFolder = "texlive-extra"; cyrillic-bin.scriptsFolder = "texlive-extra";
fontinst.scriptsFolder = "texlive-extra"; fontinst.scriptsFolder = "texlive-extra";
mptopdf.scriptsFolder = "context/perl"; mptopdf.scriptsFolder = "context/perl";
@ -66,7 +67,8 @@ in lib.recursiveUpdate orig rec {
bibexport.extraBuildInputs = [ gnugrep ]; bibexport.extraBuildInputs = [ gnugrep ];
checklistings.extraBuildInputs = [ coreutils ]; checklistings.extraBuildInputs = [ coreutils ];
cjk-gs-integrate.extraBuildInputs = [ ghostscript_headless ]; cjk-gs-integrate.extraBuildInputs = [ ghostscript_headless ];
context.extraBuildInputs = [ coreutils ruby ]; context.extraBuildInputs = [ coreutils ];
context-legacy.extraBuildInputs = [ ruby ];
cyrillic-bin.extraBuildInputs = [ coreutils gnused ]; cyrillic-bin.extraBuildInputs = [ coreutils gnused ];
dtxgen.extraBuildInputs = [ coreutils getopt gnumake zip ]; dtxgen.extraBuildInputs = [ coreutils getopt gnumake zip ];
dviljk.extraBuildInputs = [ coreutils ]; dviljk.extraBuildInputs = [ coreutils ];
@ -89,7 +91,6 @@ in lib.recursiveUpdate orig rec {
ps2eps.extraBuildInputs = [ ghostscript_headless ]; ps2eps.extraBuildInputs = [ ghostscript_headless ];
pst2pdf.extraBuildInputs = [ ghostscript_headless ]; pst2pdf.extraBuildInputs = [ ghostscript_headless ];
tex4ebook.extraBuildInputs = [ html-tidy ]; tex4ebook.extraBuildInputs = [ html-tidy ];
tex4ht.extraBuildInputs = [ ruby ];
texlive-scripts.extraBuildInputs = [ gnused ]; texlive-scripts.extraBuildInputs = [ gnused ];
texlive-scripts-extra.extraBuildInputs = [ coreutils findutils ghostscript_headless gnused ]; texlive-scripts-extra.extraBuildInputs = [ coreutils findutils ghostscript_headless gnused ];
thumbpdf.extraBuildInputs = [ ghostscript_headless ]; thumbpdf.extraBuildInputs = [ ghostscript_headless ];
@ -118,9 +119,24 @@ in lib.recursiveUpdate orig rec {
clxelatex = "cluttex"; clxelatex = "cluttex";
}; };
context.binlinks = {
context = "luametatex";
"context.lua" = tl.context.tex + "/scripts/context/lua/context.lua";
mtxrun = "luametatex";
"mtxrun.lua" = tl.context.tex + "/scripts/context/lua/mtxrun.lua";
};
epstopdf.binlinks.repstopdf = "epstopdf"; epstopdf.binlinks.repstopdf = "epstopdf";
pdfcrop.binlinks.rpdfcrop = "pdfcrop"; pdfcrop.binlinks.rpdfcrop = "pdfcrop";
# TODO: handle symlinks in bin.core
ptex.binlinks = {
pbibtex = tl.uptex + "/bin/upbibtex";
pdvitype = tl.uptex + "/bin/updvitype";
ppltotf = tl.uptex + "/bin/uppltotf";
ptftopl = tl.uptex + "/bin/uptftopl";
};
texdef.binlinks = { texdef.binlinks = {
latexdef = "texdef"; latexdef = "texdef";
}; };
@ -155,8 +171,11 @@ in lib.recursiveUpdate orig rec {
''; '';
context.postFixup = '' context.postFixup = ''
sed -i '2iPATH="${lib.makeBinPath [ coreutils ]}''${PATH:+:$PATH}"' "$out"/bin/{contextjit,mtxrunjit} sed -i '2iPATH="${lib.makeBinPath context.extraBuildInputs}''${PATH:+:$PATH}"' "$out"/bin/{contextjit,mtxrunjit}
sed -i '2iPATH="${lib.makeBinPath [ ruby ]}''${PATH:+:$PATH}"' "$out"/bin/texexec '';
context-legacy.postFixup = ''
sed -i '2iPATH="${lib.makeBinPath context-legacy.extraBuildInputs}''${PATH:+:$PATH}"' "$out"/bin/texexec
''; '';
cyrillic-bin.postFixup = '' cyrillic-bin.postFixup = ''
@ -246,10 +265,6 @@ in lib.recursiveUpdate orig rec {
sed -i '2ios.setenv("PATH","${lib.makeBinPath tex4ebook.extraBuildInputs}" .. (os.getenv("PATH") and ":" .. os.getenv("PATH") or ""))' "$out"/bin/tex4ebook sed -i '2ios.setenv("PATH","${lib.makeBinPath tex4ebook.extraBuildInputs}" .. (os.getenv("PATH") and ":" .. os.getenv("PATH") or ""))' "$out"/bin/tex4ebook
''; '';
tex4ht.postFixup = ''
sed -i -e '2iPATH="${lib.makeBinPath tex4ht.extraBuildInputs}''${PATH:+:$PATH}"' -e 's/\\rubyCall//g;' "$out"/bin/htcontext
'';
texlive-scripts.postFixup = '' texlive-scripts.postFixup = ''
sed -i '2iPATH="${lib.makeBinPath texlive-scripts.extraBuildInputs}''${PATH:+:$PATH}"' "$out"/bin/{fmtutil-user,mktexmf,mktexpk,mktextfm,updmap-user} sed -i '2iPATH="${lib.makeBinPath texlive-scripts.extraBuildInputs}''${PATH:+:$PATH}"' "$out"/bin/{fmtutil-user,mktexmf,mktexpk,mktextfm,updmap-user}
''; '';
@ -276,6 +291,11 @@ 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
@ -293,6 +313,9 @@ in lib.recursiveUpdate orig rec {
substituteInPlace "$out"/bin/latexindent --replace 'use FindBin;' "BEGIN { \$0 = '$scriptsFolder' . '/latexindent.pl'; }; use FindBin;" substituteInPlace "$out"/bin/latexindent --replace 'use FindBin;' "BEGIN { \$0 = '$scriptsFolder' . '/latexindent.pl'; }; use FindBin;"
''; '';
# flag lua dependency
texblend.scriptExts = [ "lua" ];
# Patch texlinks.sh back to 2015 version; # Patch texlinks.sh back to 2015 version;
# otherwise some bin/ links break, e.g. xe(la)tex. # otherwise some bin/ links break, e.g. xe(la)tex.
# add runtime dependencies to PATH # add runtime dependencies to PATH
@ -316,8 +339,8 @@ in lib.recursiveUpdate orig rec {
--replace '[dict get $::pkgs texlive.infra localrev]' '${toString orig."texlive.infra".revision}' \ --replace '[dict get $::pkgs texlive.infra localrev]' '${toString orig."texlive.infra".revision}' \
--replace '[dict get $::pkgs tlshell localrev]' '${toString orig.tlshell.revision}' --replace '[dict get $::pkgs tlshell localrev]' '${toString orig.tlshell.revision}'
''; '';
#### dependency changes
#### dependency changes
# it seems to need it to transform fonts # it seems to need it to transform fonts
xdvi.deps = (orig.xdvi.deps or []) ++ [ "metafont" ]; xdvi.deps = (orig.xdvi.deps or []) ++ [ "metafont" ];
@ -338,10 +361,6 @@ 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" ];
# TODO: remove this when updating to texlive-2023, npp-for-context is no longer in texlive
# tlpdb lists license as "noinfo", but it's gpl3: https://github.com/luigiScarso/context-npp
npp-for-context.license = [ "gpl3Only" ];
texdoc = { texdoc = {
extraRevision = "-tlpdb${toString tlpdbVersion.revision}"; extraRevision = "-tlpdb${toString tlpdbVersion.revision}";
extraVersion = "-tlpdb-${toString tlpdbVersion.revision}"; extraVersion = "-tlpdb-${toString tlpdbVersion.revision}";

File diff suppressed because it is too large Load diff