about summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/asciidoc/default.nix40
-rw-r--r--pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix2
-rw-r--r--pkgs/tools/typesetting/asciidoctor/default.nix2
-rw-r--r--pkgs/tools/typesetting/asciidoctorj/default.nix4
-rw-r--r--pkgs/tools/typesetting/bibclean/default.nix2
-rw-r--r--pkgs/tools/typesetting/biber-ms/default.nix2
-rw-r--r--pkgs/tools/typesetting/biber/default.nix2
-rw-r--r--pkgs/tools/typesetting/bibtex-tidy/default.nix20
-rw-r--r--pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch52
-rw-r--r--pkgs/tools/typesetting/coq2html/default.nix4
-rw-r--r--pkgs/tools/typesetting/docbook2x/default.nix4
-rw-r--r--pkgs/tools/typesetting/hayagriva/default.nix6
-rw-r--r--pkgs/tools/typesetting/hevea/default.nix2
-rw-r--r--pkgs/tools/typesetting/htmldoc/default.nix2
-rw-r--r--pkgs/tools/typesetting/kramdown-asciidoc/Gemfile.lock14
-rw-r--r--pkgs/tools/typesetting/kramdown-asciidoc/default.nix4
-rw-r--r--pkgs/tools/typesetting/kramdown-asciidoc/gemset.nix30
-rw-r--r--pkgs/tools/typesetting/lowdown/default.nix35
-rw-r--r--pkgs/tools/typesetting/marp/default.nix6
-rw-r--r--pkgs/tools/typesetting/mmark/default.nix2
-rw-r--r--pkgs/tools/typesetting/multimarkdown/default.nix65
-rw-r--r--pkgs/tools/typesetting/pdf2djvu/default.nix3
-rw-r--r--pkgs/tools/typesetting/pdfchain/default.nix6
-rw-r--r--pkgs/tools/typesetting/pdfsandwich/default.nix2
-rw-r--r--pkgs/tools/typesetting/pdftk/default.nix66
-rw-r--r--pkgs/tools/typesetting/pdftk/deps.json215
-rw-r--r--pkgs/tools/typesetting/pulldown-cmark/default.nix8
-rw-r--r--pkgs/tools/typesetting/rubber/default.nix22
-rw-r--r--pkgs/tools/typesetting/satysfi/default.nix2
-rw-r--r--pkgs/tools/typesetting/sile/default.nix2
-rw-r--r--pkgs/tools/typesetting/skribilo/default.nix74
-rw-r--r--pkgs/tools/typesetting/sshlatex/default.nix2
-rw-r--r--pkgs/tools/typesetting/tectonic/default.nix11
-rw-r--r--pkgs/tools/typesetting/tectonic/tests.nix1
-rw-r--r--pkgs/tools/typesetting/ted/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/advi/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/blahtexml/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/catdvi/default.nix4
-rw-r--r--pkgs/tools/typesetting/tex/dblatex/default.nix8
-rw-r--r--pkgs/tools/typesetting/tex/latexrun/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/nix/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix37
-rw-r--r--pkgs/tools/typesetting/tex/pgf-tikz/pgf-2.x.nix37
-rw-r--r--pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix37
-rw-r--r--pkgs/tools/typesetting/tex/pgf-tikz/pgf-pie.nix33
-rw-r--r--pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix33
-rw-r--r--pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix33
-rw-r--r--pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix33
-rw-r--r--pkgs/tools/typesetting/tex/pplatex/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/tetex/default.nix7
-rw-r--r--pkgs/tools/typesetting/tex/tex-match/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/texlive/bin.nix10
-rw-r--r--pkgs/tools/typesetting/tex/texlive/build-tex-env.nix28
-rw-r--r--pkgs/tools/typesetting/tex/texlive/build-tex-env.sh50
-rw-r--r--pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix49
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix16
-rw-r--r--pkgs/tools/typesetting/tex/texpresso/default.nix19
-rw-r--r--pkgs/tools/typesetting/tex/texpresso/tectonic.nix6
-rw-r--r--pkgs/tools/typesetting/tikzit/default.nix2
-rw-r--r--pkgs/tools/typesetting/xmlto/default.nix98
60 files changed, 583 insertions, 685 deletions
diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix
index 69b0ccff68bd0..24e1c6bc1a304 100644
--- a/pkgs/tools/typesetting/asciidoc/default.nix
+++ b/pkgs/tools/typesetting/asciidoc/default.nix
@@ -121,13 +121,14 @@ in python3.pkgs.buildPythonApplication rec {
   pname = "asciidoc"
     + lib.optionalString enableStandardFeatures "-full"
     + lib.optionalString enableExtraPlugins "-with-plugins";
-  version = "10.2.0";
+  version = "10.2.1";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "asciidoc-py";
     repo = "asciidoc-py";
     rev = version;
-    hash = "sha256-TqC0x9xB6e2d6Wc9bgnlqgZVOmYHmUUKfE/CKAiEtag=";
+    hash = "sha256-td3C7xTWfSzdo9Bbz0dHW2oPaCQYmUE9H2sUFfg5HH0=";
   };
 
   nativeBuildInputs = [
@@ -137,20 +138,20 @@ in python3.pkgs.buildPythonApplication rec {
   ];
 
   # install filters early, so their shebangs are patched too
-  postPatch = with lib; ''
+  postPatch = ''
     mkdir -p "$out/etc/asciidoc/filters"
     mkdir -p "$out/etc/asciidoc/backends"
-  '' + optionalString _enableDitaaFilter ''
+  '' + lib.optionalString _enableDitaaFilter ''
     echo "Extracting ditaa filter"
     unzip -d "$out/etc/asciidoc/filters/ditaa" "${ditaaFilterSrc}"
     sed -i -e "s|java -jar|${jre}/bin/java -jar|" \
         "$out/etc/asciidoc/filters/ditaa/ditaa2img.py"
-  '' + optionalString _enableMscgenFilter ''
+  '' + lib.optionalString _enableMscgenFilter ''
     echo "Extracting mscgen filter"
     unzip -d "$out/etc/asciidoc/filters/mscgen" "${mscgenFilterSrc}"
     sed -i -e "s|filter-wrapper.py mscgen|filter-wrapper.py ${mscgen}/bin/mscgen|" \
         "$out/etc/asciidoc/filters/mscgen/mscgen-filter.conf"
-  '' + optionalString _enableDiagFilter ''
+  '' + lib.optionalString _enableDiagFilter ''
     echo "Extracting diag filter"
     unzip -d "$out/etc/asciidoc/filters/diag" "${diagFilterSrc}"
     sed -i \
@@ -160,12 +161,12 @@ in python3.pkgs.buildPythonApplication rec {
         -e "s|filter='nwdiag|filter=\'${nwdiag}/bin/nwdiag|" \
         -e "s|filter='packetdiag|filter=\'${nwdiag}/bin/packetdiag|" \
         "$out/etc/asciidoc/filters/diag/diag-filter.conf"
-  '' + optionalString _enableQrcodeFilter ''
+  '' + lib.optionalString _enableQrcodeFilter ''
     echo "Extracting qrcode filter"
     unzip -d "$out/etc/asciidoc/filters/qrcode" "${qrcodeFilterSrc}"
     sed -i -e "s|systemcmd('qrencode|systemcmd('${qrencode}/bin/qrencode|" \
         "$out/etc/asciidoc/filters/qrcode/qrcode2img.py"
-  '' + optionalString _enableMatplotlibFilter ''
+  '' + lib.optionalString _enableMatplotlibFilter ''
     echo "Extracting mpl (matplotlib) filter"
     mkdir -p "$out/etc/asciidoc/filters/mpl"
     tar xvf "${matplotlibFilterSrc}" -C "$out/etc/asciidoc/filters/mpl" --strip-components=1
@@ -176,7 +177,7 @@ in python3.pkgs.buildPythonApplication rec {
     numpy_path="$(toPythonPath ${numpy})"
     sed -i "/^import.*sys/asys.path.append(\"$matplotlib_path\"); sys.path.append(\"$numpy_path\");" \
         "$out/etc/asciidoc/filters/mpl/mplw.py"
-  '' + optionalString _enableAafigureFilter ''
+  '' + lib.optionalString _enableAafigureFilter ''
     echo "Extracting aafigure filter"
     unzip -d "$out/etc/asciidoc/filters/aafigure" "${aafigureFilterSrc}"
     # Add aafigure to sys.path (and it needs recursive-pth-loader)
@@ -184,10 +185,10 @@ in python3.pkgs.buildPythonApplication rec {
     aafigure_path="$(toPythonPath ${aafigure})"
     sed -i "/^import.*sys/asys.path.append(\"$pth_loader_path\"); sys.path.append(\"$aafigure_path\"); import sitecustomize" \
         "$out/etc/asciidoc/filters/aafigure/aafig2img.py"
-  '' + optionalString _enableDeckjsBackend ''
+  '' + lib.optionalString _enableDeckjsBackend ''
     echo "Extracting deckjs backend"
     unzip -d "$out/etc/asciidoc/backends/deckjs" "${deckjsBackendSrc}"
-  '' + optionalString _enableOdfBackend ''
+  '' + lib.optionalString _enableOdfBackend ''
     echo "Extracting odf backend (odt + odp)"
     unzip -d "$out/etc/asciidoc/backends/odt" "${odtBackendSrc}"
     unzip -d "$out/etc/asciidoc/backends/odp" "${odpBackendSrc}"
@@ -227,7 +228,7 @@ in python3.pkgs.buildPythonApplication rec {
         -e "s|^ASCIIDOC =.*|ASCIIDOC = '$out/bin/asciidoc'|" \
         -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \
         -e "s|^DBLATEX =.*|DBLATEX = '${dblatexFull}/bin/dblatex'|" \
-        ${optionalString enableJava ''-e "s|^FOP =.*|FOP = '${fop}/bin/fop'|"''} \
+        ${lib.optionalString enableJava ''-e "s|^FOP =.*|FOP = '${fop}/bin/fop'|"''} \
         -e "s|^W3M =.*|W3M = '${w3m}/bin/w3m'|" \
         -e "s|^LYNX =.*|LYNX = '${lynx}/bin/lynx'|" \
         -e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \
@@ -250,6 +251,8 @@ in python3.pkgs.buildPythonApplication rec {
       --replace "python3 -m asciidoc.a2x" "${buildPackages.asciidoc}/bin/a2x"
   '';
 
+  build-system = with python3.pythonOnBuildForHost.pkgs; [ setuptools ];
+
   postBuild = ''
     make manpages
   '';
@@ -271,7 +274,7 @@ in python3.pkgs.buildPythonApplication rec {
     runHook postCheck
   '';
 
-  meta = with lib; {
+  meta = {
     description = "Text-based document generation system";
     longDescription = ''
       AsciiDoc is a text document format for writing notes, documentation,
@@ -283,13 +286,12 @@ in python3.pkgs.buildPythonApplication rec {
       the backend output markups (which can be almost any type of SGML/XML
       markup) can be customized and extended by the user.
     '';
-    sourceProvenance = with sourceTypes; [
-      fromSource
-    ] ++ lib.optional _enableDitaaFilter binaryBytecode;
+    sourceProvenance = [ lib.sourceTypes.fromSource ]
+      ++ lib.optional _enableDitaaFilter lib.sourceTypes.binaryBytecode;
     homepage = "https://asciidoc-py.github.io/";
     changelog = "https://github.com/asciidoc-py/asciidoc-py/blob/${version}/CHANGELOG.adoc";
-    license = licenses.gpl2Plus;
-    platforms = platforms.unix;
-    maintainers = with maintainers; [ bjornfor dotlambda ];
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ bjornfor dotlambda ];
   };
 }
diff --git a/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix b/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix
index ba9c21631a90e..c236b436acf1a 100644
--- a/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix
@@ -33,7 +33,7 @@ bundlerApp rec {
   };
 
   meta = with lib; {
-    description = "A faster Asciidoc processor written in Ruby, with many extensions enabled";
+    description = "Faster Asciidoc processor written in Ruby, with many extensions enabled";
     homepage = "https://asciidoctor.org/";
     license = licenses.mit;
     maintainers = with maintainers; [ doronbehar ];
diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix
index 5f78c12508d14..8b20e718f8fd4 100644
--- a/pkgs/tools/typesetting/asciidoctor/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor/default.nix
@@ -17,7 +17,7 @@ bundlerApp {
   };
 
   meta = with lib; {
-    description = "A faster Asciidoc processor written in Ruby";
+    description = "Faster Asciidoc processor written in Ruby";
     homepage = "https://asciidoctor.org/";
     license = licenses.mit;
     maintainers = with maintainers; [ gpyh nicknovitski ];
diff --git a/pkgs/tools/typesetting/asciidoctorj/default.nix b/pkgs/tools/typesetting/asciidoctorj/default.nix
index ac9abf1924c02..2909573298214 100644
--- a/pkgs/tools/typesetting/asciidoctorj/default.nix
+++ b/pkgs/tools/typesetting/asciidoctorj/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "asciidoctorj";
-  version = "2.5.12";
+  version = "2.5.13";
 
   src = fetchzip {
     url = "mirror://maven/org/asciidoctor/${pname}/${version}/${pname}-${version}-bin.zip";
-    sha256 = "sha256-cpFY9nEqy7yBevupHMpNybqnAfN2fT9RcSKWlRdWsag=";
+    sha256 = "sha256-II6R5/7vDONkk/6pL1n/h7Snvu3vaLulIOAw/FjZMBc=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/typesetting/bibclean/default.nix b/pkgs/tools/typesetting/bibclean/default.nix
index f51a41e5f343b..eb84ff8d7037d 100644
--- a/pkgs/tools/typesetting/bibclean/default.nix
+++ b/pkgs/tools/typesetting/bibclean/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Prettyprint and syntax check BibTeX and Scribe bibliography data base files";
     homepage = "http://ftp.math.utah.edu/pub/bibclean";
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     platforms = platforms.all;
     maintainers = with maintainers; [ dtzWill ];
   };
diff --git a/pkgs/tools/typesetting/biber-ms/default.nix b/pkgs/tools/typesetting/biber-ms/default.nix
index 9cf2bbe014f1e..27821bbd8adac 100644
--- a/pkgs/tools/typesetting/biber-ms/default.nix
+++ b/pkgs/tools/typesetting/biber-ms/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, fetchurl, perlPackages, shortenPerlShebang, texlive }:
+{ lib, stdenv, fetchFromGitHub, perlPackages, shortenPerlShebang, texlive }:
 
 let
   biberSource = texlive.pkgs.biber-ms.texsource;
diff --git a/pkgs/tools/typesetting/biber/default.nix b/pkgs/tools/typesetting/biber/default.nix
index 08038c41377f5..f14096900ed9c 100644
--- a/pkgs/tools/typesetting/biber/default.nix
+++ b/pkgs/tools/typesetting/biber/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, perlPackages, shortenPerlShebang, texlive }:
+{ lib, stdenv, perlPackages, shortenPerlShebang, texlive }:
 
 let
   biberSource = texlive.pkgs.biber.texsource;
diff --git a/pkgs/tools/typesetting/bibtex-tidy/default.nix b/pkgs/tools/typesetting/bibtex-tidy/default.nix
index 6fa64d653736c..862c82c9d5c90 100644
--- a/pkgs/tools/typesetting/bibtex-tidy/default.nix
+++ b/pkgs/tools/typesetting/bibtex-tidy/default.nix
@@ -1,30 +1,34 @@
 { lib
 , buildNpmPackage
 , fetchFromGitHub
+, testers
+, bibtex-tidy
 }:
 
 buildNpmPackage rec {
   pname = "bibtex-tidy";
-  version = "1.11.0";
+  version = "1.14.0";
 
   src = fetchFromGitHub {
     owner = "FlamingTempura";
     repo = "bibtex-tidy";
     rev = "v${version}";
-    hash = "sha256-VjQuMQr3OJgjgX6FdH/C4mehf8H7XjDZ9Rxs92hyQVo=";
+    hash = "sha256-sMgy29deEfc3DFSC0Z4JZCeNAFpBKNYj+mJnFI1pSY4=";
   };
 
-  patches = [
-    # downloads Google fonts during `npm run build`
-    ./remove-google-font-loader.patch
-  ];
-
-  npmDepsHash = "sha256-u2lyG95F00S/bvsVwu0hIuUw2UZYQWFakCF31LIijSU=";
+  npmDepsHash = "sha256-FKde5/ZZcS5g0fUaDjhRlKGLiS8kk1PvkZw9PUmvAAE=";
 
   env = {
     PUPPETEER_SKIP_DOWNLOAD = true;
   };
 
+  passthru.tests = {
+    version = testers.testVersion {
+      package = bibtex-tidy;
+      version = "v${version}";
+    };
+  };
+
   meta = {
     changelog = "https://github.com/FlamingTempura/bibtex-tidy/blob/${src.rev}/CHANGELOG.md";
     description = "Cleaner and Formatter for BibTeX files";
diff --git a/pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch b/pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch
deleted file mode 100644
index 79c6850cf6cb0..0000000000000
--- a/pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/build.ts b/build.ts
-index ae4e350..3498ae7 100644
---- a/build.ts
-+++ b/build.ts
-@@ -312,7 +312,6 @@ async function buildWebBundle() {
- 		target: ['esnext'],
- 		plugins: [
- 			sveltePlugin({ preprocess: autoPreprocess() }),
--			googleFontPlugin,
- 			regexpuPlugin,
- 		],
- 	});
-@@ -344,7 +343,6 @@ async function serveWeb() {
- 				preprocess: autoPreprocess(),
- 				compilerOptions: { enableSourcemap: true },
- 			}),
--			googleFontPlugin,
- 		],
- 	});
- 	const server = await ctx.serve({ servedir: WEB_PATH });
-@@ -375,31 +373,6 @@ const regexpuPlugin: Plugin = {
- 	},
- };
- 
--// Downloads google fonts and injects them as base64 urls into bundle css
--const googleFontPlugin: Plugin = {
--	name: 'google-font-loader',
--	setup(build) {
--		build.onResolve({ filter: /^https?:\/\/fonts\./ }, (args) => ({
--			path: args.path,
--			namespace: 'http-url',
--		}));
--		build.onLoad(
--			{ filter: /.*/, namespace: 'http-url' },
--			async (args): Promise<OnLoadResult> => {
--				const res = await fetch(args.path, {
--					headers: {
--						// ensures google responds with woff2 fonts
--						'User-Agent': 'Mozilla/5.0 Firefox/90.0',
--					},
--				});
--				const contents = Buffer.from(await res.arrayBuffer());
--				const loader = args.path.endsWith('.woff2') ? 'dataurl' : 'css';
--				return { contents, loader };
--			}
--		);
--	},
--};
--
- /**
-  * swc converts js syntax to support older browsers. ESBuild can kinda do this
-  * but only for more recent browsers. swc is also far easier to configure than
diff --git a/pkgs/tools/typesetting/coq2html/default.nix b/pkgs/tools/typesetting/coq2html/default.nix
index 69b3bc0ff2396..049a48089aea6 100644
--- a/pkgs/tools/typesetting/coq2html/default.nix
+++ b/pkgs/tools/typesetting/coq2html/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation  rec {
   pname = "coq2html";
-  version = "1.3";
+  version = "1.4";
 
   src = fetchFromGitHub {
     owner = "xavierleroy";
     repo = "coq2html";
     rev = "v${version}";
-    hash = "sha256-2J9uETDt+P+t4E9KhTIypA4MQpTCCxYmR6FYF30RqKk=";
+    hash = "sha256-dBXYeRwBhBWXJfdULLzfgZU+WD6WC6R8wV2eS1zAkq8=";
   };
 
   nativeBuildInputs = [ ocaml ];
diff --git a/pkgs/tools/typesetting/docbook2x/default.nix b/pkgs/tools/typesetting/docbook2x/default.nix
index 3fa76f56d0f07..f964f7633d9ec 100644
--- a/pkgs/tools/typesetting/docbook2x/default.nix
+++ b/pkgs/tools/typesetting/docbook2x/default.nix
@@ -1,5 +1,5 @@
 { fetchurl, lib, stdenv, texinfo, perlPackages
-, groff, libxml2, libxslt, gnused, libiconv, opensp
+, groff, libxml2, libxslt, gnused, libiconv, iconv, opensp
 , docbook_xml_dtd_43, bash
 , makeWrapper }:
 
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   patches = [ ./db2x_texixml-to-stdout.patch ];
 
   nativeBuildInputs = [ makeWrapper perlPackages.perl texinfo libxslt ];
-  buildInputs = [ groff libxml2 opensp libiconv bash ]
+  buildInputs = [ groff libxml2 opensp libiconv iconv bash ]
     ++ (with perlPackages; [ perl XMLSAX XMLParser XMLNamespaceSupport ]);
 
   postConfigure = ''
diff --git a/pkgs/tools/typesetting/hayagriva/default.nix b/pkgs/tools/typesetting/hayagriva/default.nix
index 6574c0c9c6e94..2bf7a4f401d6c 100644
--- a/pkgs/tools/typesetting/hayagriva/default.nix
+++ b/pkgs/tools/typesetting/hayagriva/default.nix
@@ -5,14 +5,14 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "hayagriva";
-  version = "0.5.2";
+  version = "0.5.3";
 
   src = fetchCrate {
     inherit pname version;
-    hash = "sha256-hE0Oi+0vDQGDEOYtHiPit1RrrkrlLZs20nEHOm/bp5M=";
+    hash = "sha256-6LJRvyCgcj/m25kC26vT3aUREstXmmCIR4+LoHZgIqw=";
   };
 
-  cargoHash = "sha256-WZbbjLDHYJTiuM0Lh9YfVvLTvK/jfO8fRbLqZ8XOLGg=";
+  cargoHash = "sha256-asINO3zy4x+n7chriC8ESCe3K027xFUNi+54XtQwS0w=";
 
   buildFeatures = [ "cli" ];
 
diff --git a/pkgs/tools/typesetting/hevea/default.nix b/pkgs/tools/typesetting/hevea/default.nix
index f03ee980583f5..85317b7d7ecd8 100644
--- a/pkgs/tools/typesetting/hevea/default.nix
+++ b/pkgs/tools/typesetting/hevea/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
   makeFlags = [ "PREFIX=$(out)" ];
 
   meta = with lib; {
-    description = "A quite complete and fast LATEX to HTML translator";
+    description = "Quite complete and fast LATEX to HTML translator";
     homepage = "https://hevea.inria.fr/";
     changelog = "https://github.com/maranget/hevea/raw/v${version}/CHANGES";
     license = licenses.qpl;
diff --git a/pkgs/tools/typesetting/htmldoc/default.nix b/pkgs/tools/typesetting/htmldoc/default.nix
index 63b6e406ae098..f47c9dac0f10b 100644
--- a/pkgs/tools/typesetting/htmldoc/default.nix
+++ b/pkgs/tools/typesetting/htmldoc/default.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
     homepage    = "https://michaelrsweet.github.io/htmldoc";
     changelog   = "https://github.com/michaelrsweet/htmldoc/releases/tag/v${version}";
     license     = licenses.gpl2Only;
-    maintainers = with maintainers; [ ];
+    maintainers = [ ];
     platforms   = platforms.unix;
 
     longDescription = ''
diff --git a/pkgs/tools/typesetting/kramdown-asciidoc/Gemfile.lock b/pkgs/tools/typesetting/kramdown-asciidoc/Gemfile.lock
index c975e23f323c2..50c1f5ffddba0 100644
--- a/pkgs/tools/typesetting/kramdown-asciidoc/Gemfile.lock
+++ b/pkgs/tools/typesetting/kramdown-asciidoc/Gemfile.lock
@@ -1,9 +1,15 @@
 GEM
   remote: https://rubygems.org/
   specs:
-    kramdown (1.17.0)
-    kramdown-asciidoc (1.0.1)
-      kramdown (~> 1.17.0)
+    kramdown (2.4.0)
+      rexml
+    kramdown-asciidoc (2.1.0)
+      kramdown (~> 2.4.0)
+      kramdown-parser-gfm (~> 1.1.0)
+      rexml (~> 3.2.0)
+    kramdown-parser-gfm (1.1.0)
+      kramdown (~> 2.0)
+    rexml (3.2.6)
 
 PLATFORMS
   ruby
@@ -12,4 +18,4 @@ DEPENDENCIES
   kramdown-asciidoc
 
 BUNDLED WITH
-   2.1.4
+   2.4.22
diff --git a/pkgs/tools/typesetting/kramdown-asciidoc/default.nix b/pkgs/tools/typesetting/kramdown-asciidoc/default.nix
index f3058156848ed..90949bb96878f 100644
--- a/pkgs/tools/typesetting/kramdown-asciidoc/default.nix
+++ b/pkgs/tools/typesetting/kramdown-asciidoc/default.nix
@@ -25,10 +25,10 @@ let
     # };
 
     meta = with lib; {
-      description = "A kramdown extension for converting Markdown documents to AsciiDoc";
+      description = "Kramdown extension for converting Markdown documents to AsciiDoc";
       homepage = "https://asciidoctor.org/";
       license = licenses.mit;
-      maintainers = with maintainers; [ ];
+      maintainers = [ ];
       platforms = platforms.unix;
       mainProgram = "kramdoc";
     };
diff --git a/pkgs/tools/typesetting/kramdown-asciidoc/gemset.nix b/pkgs/tools/typesetting/kramdown-asciidoc/gemset.nix
index 0ade973304d19..e750dd6655ac8 100644
--- a/pkgs/tools/typesetting/kramdown-asciidoc/gemset.nix
+++ b/pkgs/tools/typesetting/kramdown-asciidoc/gemset.nix
@@ -1,23 +1,45 @@
 {
   kramdown = {
+    dependencies = ["rexml"];
     groups = ["default"];
     platforms = [];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq";
+      sha256 = "1ic14hdcqxn821dvzki99zhmcy130yhv5fqfffkcf87asv5mnbmn";
       type = "gem";
     };
-    version = "1.17.0";
+    version = "2.4.0";
   };
   kramdown-asciidoc = {
+    dependencies = ["kramdown" "kramdown-parser-gfm" "rexml"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1j7qbpq6zhgcf9ykhz5r1wlr3r8fls6hvhdisxzz4v35rni5kwp9";
+      type = "gem";
+    };
+    version = "2.1.0";
+  };
+  kramdown-parser-gfm = {
     dependencies = ["kramdown"];
     groups = ["default"];
     platforms = [];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1nr4hss1byhchwkqy2w0dgc7s83n0s5xm0pjms2cmckc4sbrryxi";
+      sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv";
+      type = "gem";
+    };
+    version = "1.1.0";
+  };
+  rexml = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "05i8518ay14kjbma550mv0jm8a6di8yp5phzrd8rj44z9qnrlrp0";
       type = "gem";
     };
-    version = "1.0.1";
+    version = "3.2.6";
   };
 }
diff --git a/pkgs/tools/typesetting/lowdown/default.nix b/pkgs/tools/typesetting/lowdown/default.nix
index 189ba55838b66..bf9e06deca34c 100644
--- a/pkgs/tools/typesetting/lowdown/default.nix
+++ b/pkgs/tools/typesetting/lowdown/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, fetchurl, fixDarwinDylibNames, which, dieHook
+, fetchpatch
 , enableShared ? !stdenv.hostPlatform.isStatic
 , enableStatic ? stdenv.hostPlatform.isStatic
 # for passthru.tests
@@ -16,6 +17,40 @@ stdenv.mkDerivation rec {
     hash = "sha512-EpAWTz7Zy+2qqJGgzLrt0tK7WEZ+hHbdyqzAmMiaqc6uNXscR88git6/UbTjvB9Yanvetvw9huSuyhcORCEIug==";
   };
 
+  patches = [
+    # Improve UTF-8 handling on macOS by not treating bytes >=0x80, which tend to be
+    # UTF-8 continuation bytes, as control characters.
+    #
+    # This leaves control characters U+0080 through U+009F in the output
+    # (incorrectly) but doesn't mangle other UTF-8 characters, so it's a net
+    # win.
+    #
+    # See: https://github.com/kristapsdz/lowdown/pull/140
+    (fetchpatch {
+      url = "https://github.com/kristapsdz/lowdown/commit/5a02866dd682363a8e4f6b344c223cfe8b597da9.diff";
+      hash = "sha256-7tGhZJQQySeBv4h6A4r69BBbQkPRX/3JTw/80A8YXjQ=";
+    })
+    (fetchpatch {
+      url = "https://github.com/kristapsdz/lowdown/commit/c033a6886e4d6efb948782fbc389fe5f673acf36.diff";
+      hash = "sha256-7DvKFerAMoPifuTn7rOX4ru888HfBkpspH1opIbzj08=";
+    })
+
+    # Don't output a newline after .SH
+    #
+    # This fixes `makewhatis` output on macOS and (as a result) `man`
+    # completions for `fish` on macOS.
+    #
+    # See: https://github.com/kristapsdz/lowdown/pull/138
+    (fetchpatch {
+      url = "https://github.com/kristapsdz/lowdown/commit/e05929a09a697de3d2eb14d0f0a087a6fae22e11.diff";
+      hash = "sha256-P03W+hFeBKwfJB+DhGCPq0DtiOiLLc+0ZvWrWqXFvVU=";
+    })
+    (fetchpatch {
+      url = "https://github.com/kristapsdz/lowdown/commit/9906f8ceac586c54eb39ae78105fd84653a89c33.diff";
+      hash = "sha256-nBnAgTb8RDe/QpUhow3lyeR7UIVJX2o4lmP78e2fw/E=";
+    })
+  ];
+
   nativeBuildInputs = [ which dieHook ]
     ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
 
diff --git a/pkgs/tools/typesetting/marp/default.nix b/pkgs/tools/typesetting/marp/default.nix
index b61cc4dcdf661..2412935a0f9d3 100644
--- a/pkgs/tools/typesetting/marp/default.nix
+++ b/pkgs/tools/typesetting/marp/default.nix
@@ -10,18 +10,18 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "marp-cli";
-  version = "3.2.0";
+  version = "3.4.0";
 
   src = fetchFromGitHub {
     owner = "marp-team";
     repo = "marp-cli";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-bx5mq5KI85qUct/9Hr6mby6dWmRkmpVbiIw+M8PZas8=";
+    hash = "sha256-azscuPkQ9/xcQtBg+5pJigXSQQVtBGvbd7ZwiLwU7Qo=";
   };
 
   offlineCache = fetchYarnDeps {
     yarnLock = "${finalAttrs.src}/yarn.lock";
-    hash = "sha256-BogCt7ezmWxv2YfhljHYoBf47/FHR0qLZosjnoQhqgs=";
+    hash = "sha256-b/JyhsfXEbmM6+ajrjL65WhX9u9MEH+m1NHE6cTyf2g=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/tools/typesetting/mmark/default.nix b/pkgs/tools/typesetting/mmark/default.nix
index 3e1c95ca02417..ab371104dc868 100644
--- a/pkgs/tools/typesetting/mmark/default.nix
+++ b/pkgs/tools/typesetting/mmark/default.nix
@@ -23,7 +23,7 @@ buildGoModule rec {
   };
 
   meta = {
-    description = "A powerful markdown processor in Go geared towards the IETF";
+    description = "Powerful markdown processor in Go geared towards the IETF";
     homepage = "https://github.com/mmarkdown/mmark";
     license = with lib.licenses; bsd2;
     maintainers = with lib.maintainers; [ yrashk ];
diff --git a/pkgs/tools/typesetting/multimarkdown/default.nix b/pkgs/tools/typesetting/multimarkdown/default.nix
deleted file mode 100644
index 65cf5931ac10c..0000000000000
--- a/pkgs/tools/typesetting/multimarkdown/default.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, cmake
-, perl
-, pkg-config
-}:
-
-stdenv.mkDerivation rec {
-  pname = "multimarkdown";
-  version = "6.6.0";
-
-  src = fetchFromGitHub {
-    owner = "fletcher";
-    repo = "MultiMarkdown-6";
-    rev = version;
-    hash = "sha256-emJbY0wucoc/GdjlILoeqjwuwuPpTjXTqZN0gUKOyLg=";
-  };
-
-  postPatch = ''
-    patchShebangs tools/enumsToPerl.pl
-  '';
-
-  postInstall = ''
-    # Move files from $out/ to sub directories to prevent conflicts
-    # with other packages:
-    mkdir -p $out/share/doc/multimarkdown/
-    mv $out/LICENSE.txt $out/README.txt $out/share/doc/multimarkdown/
-  '';
-
-  nativeBuildInputs = [
-    cmake
-    perl
-    pkg-config
-  ];
-
-  meta = with lib; {
-    homepage = "https://fletcher.github.io/MultiMarkdown-6/introduction.html";
-    description = "A derivative of Markdown that adds new syntax features";
-    longDescription = ''
-      MultiMarkdown is a lightweight markup language created by
-      Fletcher T. Penney and based on Markdown, which supports
-      more export-formats (html, latex, beamer, memoir, odf, opml,
-      lyx, mmd) and implements some added features currently not
-      available with plain Markdown syntax.
-
-      It adds the following features to Markdown:
-
-      - footnotes
-      - tables
-      - citations and bibliography (works best in LaTeX using BibTeX)
-      - math support
-      - automatic cross-referencing ability
-      - smart typography, with support for multiple languages
-      - image attributes
-      - table and image captions
-      - definition lists
-      - glossary entries (LaTeX only)
-      - document metadata (e.g. title, author, date, etc.)
-    '';
-    license = with licenses; [ mit ];
-    platforms = platforms.all;
-    maintainers = with maintainers; [ AndersonTorres ];
-  };
-}
diff --git a/pkgs/tools/typesetting/pdf2djvu/default.nix b/pkgs/tools/typesetting/pdf2djvu/default.nix
index 09285cf2843b7..da741c76c70b4 100644
--- a/pkgs/tools/typesetting/pdf2djvu/default.nix
+++ b/pkgs/tools/typesetting/pdf2djvu/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchFromGitHub
-, fetchpatch
 , autoreconfHook
 , gettext
 , libtool
@@ -60,7 +59,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Creates djvu files from PDF files";
     homepage = "https://jwilk.net/software/pdf2djvu";
-    license = licenses.gpl2;
+    license = licenses.gpl2Only;
     maintainers = with maintainers; [ pSub ];
     mainProgram = "pdf2djvu";
   };
diff --git a/pkgs/tools/typesetting/pdfchain/default.nix b/pkgs/tools/typesetting/pdfchain/default.nix
index 6d772a6fea20a..0b94c54870d1f 100644
--- a/pkgs/tools/typesetting/pdfchain/default.nix
+++ b/pkgs/tools/typesetting/pdfchain/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, fetchDebianPatch
-, autoconf, gtkmm3, glib, pdftk, pkg-config, wrapGAppsHook
+, autoconf, gtkmm3, glib, pdftk, pkg-config, wrapGAppsHook3
 }:
 
 stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [
-    pkg-config wrapGAppsHook autoconf
+    pkg-config wrapGAppsHook3 autoconf
   ];
 
   buildInputs = [
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    description = "A graphical user interface for the PDF Toolkit (PDFtk)";
+    description = "Graphical user interface for the PDF Toolkit (PDFtk)";
     homepage = "https://pdfchain.sourceforge.io";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ hqurve ];
diff --git a/pkgs/tools/typesetting/pdfsandwich/default.nix b/pkgs/tools/typesetting/pdfsandwich/default.nix
index 377a7f7bf4327..8343e382c807b 100644
--- a/pkgs/tools/typesetting/pdfsandwich/default.nix
+++ b/pkgs/tools/typesetting/pdfsandwich/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
 meta = with lib; {
     description = "OCR tool for scanned PDFs";
     homepage = "http://www.tobias-elze.de/pdfsandwich/";
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     maintainers = [ maintainers.rps ];
     platforms = platforms.linux;
     mainProgram = "pdfsandwich";
diff --git a/pkgs/tools/typesetting/pdftk/default.nix b/pkgs/tools/typesetting/pdftk/default.nix
index 27d95c00c01bd..9ecb87b86ff65 100644
--- a/pkgs/tools/typesetting/pdftk/default.nix
+++ b/pkgs/tools/typesetting/pdftk/default.nix
@@ -1,6 +1,6 @@
-{ lib, stdenv, fetchFromGitLab, gradle, jre, perl, writeText, runtimeShell }:
+{ lib, stdenv, fetchFromGitLab, gradle, jre, runtimeShell }:
 
-let
+stdenv.mkDerivation rec {
   pname = "pdftk";
   version = "3.3.3";
 
@@ -11,66 +11,18 @@ let
     hash = "sha256-ciKotTHSEcITfQYKFZ6sY2LZnXGChBJy0+eno8B3YHY=";
   };
 
-  deps = stdenv.mkDerivation {
-    pname = "${pname}-deps";
-    inherit src version;
-
-    nativeBuildInputs = [ gradle perl ];
-
-    buildPhase = ''
-      export GRADLE_USER_HOME=$(mktemp -d)
-      gradle -Dfile.encoding=utf-8 shadowJar;
-    '';
-
-    # Mavenize dependency paths
-    # e.g. org.codehaus.groovy/groovy/2.4.0/{hash}/groovy-2.4.0.jar -> org/codehaus/groovy/groovy/2.4.0/groovy-2.4.0.jar
-    installPhase = ''
-      find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \
-        | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
-        | sh
-    '';
+  nativeBuildInputs = [ gradle ];
 
-    outputHashAlgo = "sha256";
-    outputHashMode = "recursive";
-    outputHash = "sha256-Mx5CdiRxuql22kbLozzr9Rs2E2Svzg2zN1138Xa0pMc=";
+  mitmCache = gradle.fetchDeps {
+    inherit pname;
+    data = ./deps.json;
   };
 
-  # Point to our local deps repo
-  gradleInit = writeText "init.gradle" ''
-    logger.lifecycle 'Replacing Maven repositories with ${deps}...'
-    gradle.projectsLoaded {
-      rootProject.allprojects {
-        buildscript {
-          repositories {
-            clear()
-            maven { url '${deps}' }
-          }
-        }
-        repositories {
-          clear()
-          maven { url '${deps}' }
-        }
-      }
-    }
+  __darwinAllowLocalNetworking = true;
 
-    settingsEvaluated { settings ->
-      settings.pluginManagement {
-        repositories {
-          maven { url '${deps}' }
-        }
-      }
-  }
-  '';
+  gradleFlags = [ "-Dfile.encoding=utf-8" ];
 
-in stdenv.mkDerivation rec {
-  inherit pname version src;
-
-  nativeBuildInputs = [ gradle ];
-
-  buildPhase = ''
-    export GRADLE_USER_HOME=$(mktemp -d)
-    gradle --offline --no-daemon --info --init-script ${gradleInit} shadowJar
-  '';
+  gradleBuildTask = "shadowJar";
 
   installPhase = ''
     mkdir -p $out/{bin,share/pdftk,share/man/man1}
diff --git a/pkgs/tools/typesetting/pdftk/deps.json b/pkgs/tools/typesetting/pdftk/deps.json
new file mode 100644
index 0000000000000..b257c8e8ba1fb
--- /dev/null
+++ b/pkgs/tools/typesetting/pdftk/deps.json
@@ -0,0 +1,215 @@
+{
+ "!comment": "This is a nixpkgs Gradle dependency lockfile. For more details, refer to the Gradle section in the nixpkgs manual.",
+ "!version": 1,
+ "https://plugins.gradle.org/m2": {
+  "com/diffplug/durian#durian-collect/1.2.0": {
+   "jar": "sha256-sZTAuIAhzBFsIcHcdvScLB/hda9by3TIume527+aSMw=",
+   "pom": "sha256-i7diCGoKT9KmRzu/kFx0R2OvodWaVjD3O7BLeHLAn/M="
+  },
+  "com/diffplug/durian#durian-core/1.2.0": {
+   "jar": "sha256-F+0KrLOjwWMjMyFou96thpTzKACytH1p1KTEmxFNXa4=",
+   "pom": "sha256-hwMg6QdVNxsBeW/oG6Ul/R3ui3A0b1VFUe7dQonwtmI="
+  },
+  "com/diffplug/durian#durian-io/1.2.0": {
+   "jar": "sha256-CV/R3HeIjAc/C+OaAYFW7lJnInmLCd6eKF7yE14W6sQ=",
+   "pom": "sha256-NQkZQkMk4nUKPdwvobzmqQrIziklaYpgqbTR1uSSL/4="
+  },
+  "com/diffplug/spotless#com.diffplug.spotless.gradle.plugin/6.10.0": {
+   "pom": "sha256-KBM628w3hpIzn4fzKVkykdnjBnmrwpsBVCzmULjHoL4="
+  },
+  "com/diffplug/spotless#spotless-lib-extra/2.29.0": {
+   "jar": "sha256-m0zpiqT128dYUP5tmnnoeNMYvnGPmX5epAUsiFYhuqs=",
+   "module": "sha256-QW44lubwZ/WXlI70QVDJk43wV6NCt31X20gqj5aWgeg=",
+   "pom": "sha256-hf5PLJpFEVVtzqLbzFth9+f+VlxgedC5ItVmLJCIu+8="
+  },
+  "com/diffplug/spotless#spotless-lib/2.29.0": {
+   "jar": "sha256-G/rNp1jy4JDwLBVoR3PlORR/3od/rezZsAY3v536q8c=",
+   "module": "sha256-Rty7wtfX0d47lSZoX66uA20b/XwrvhL3izIuD1xLVk8=",
+   "pom": "sha256-v0UZJkr/2hRWrbjIHLazJ5AiMBqn/tdbNKlM34Oj4bo="
+  },
+  "com/diffplug/spotless#spotless-plugin-gradle/6.10.0": {
+   "jar": "sha256-p8P8jOFdk311AFsuSclmXdp2UfLSLk7Kn7G03eR79As=",
+   "module": "sha256-m6j/efMjDs5rZomCishSor+pbZl8JXKjre7wtrFckq0=",
+   "pom": "sha256-+PCTwoomONZy0ML6LCljz5WFVKoeFHuuvLIEsViM4ns="
+  },
+  "com/fasterxml#oss-parent/38": {
+   "pom": "sha256-yD+PRd/cqNC2s2YcYLP4R4D2cbEuBvka1dHBodH5Zug="
+  },
+  "com/fasterxml/jackson#jackson-base/2.11.2": {
+   "pom": "sha256-k0uchkLt8xBMUAKC+4EGxzxWeBw9xMdelr2NG7Ha3p0="
+  },
+  "com/fasterxml/jackson#jackson-bom/2.11.2": {
+   "pom": "sha256-2qQsw65gqJH9ssh0ZxtiPc0tH+/Kd7z7OU/rHRInfME="
+  },
+  "com/fasterxml/jackson#jackson-parent/2.11": {
+   "pom": "sha256-wbChPYz+Y7QLD66EWLmUYxae0MYPf8lj7z8FJXFQy+g="
+  },
+  "com/fasterxml/jackson/core#jackson-annotations/2.11.2": {
+   "jar": "sha256-kNYC0ZVd9QmxVpYYz/hpmUyvlIPLgqPMs5eCpc2lQSY=",
+   "pom": "sha256-AEEc6Dh0WAKZWB4oOuRaXtN7AFHm9WO2miVQeKtYk+4="
+  },
+  "com/fasterxml/jackson/core#jackson-core/2.11.2": {
+   "jar": "sha256-+NdoxOiIRSK+WIHdKpGuyBLQjU8FhStDQZDiLeZZ38k=",
+   "pom": "sha256-QL3NBekAYAtBM3NCz1xpwln9ii+en0p5aNYebvWeOYw="
+  },
+  "com/fasterxml/jackson/core#jackson-databind/2.11.2": {
+   "jar": "sha256-y4kLSq2O0hp7V+PI95JNvcoa7/nd0nyw/zckMDeuE0I=",
+   "pom": "sha256-9a5wZBwK4Svl+UaDjujKE9qIk+d7RNkNXuJfPfjhYQU="
+  },
+  "com/github/johnrengelman/shadow#com.github.johnrengelman.shadow.gradle.plugin/7.1.2": {
+   "pom": "sha256-lW5FCF5S6l7zLTRnHruE6xxBqDxFSa8m5oY18QYXmNM="
+  },
+  "com/googlecode/concurrent-trees#concurrent-trees/2.6.1": {
+   "jar": "sha256-BONySYTipcv1VgbPo3KlvT08XSohUzpwBOPN5Tl2H6U=",
+   "pom": "sha256-Q8K5sULnBV0fKlgn8QlEkl0idH2XVrMlDAeqtHU4qXE="
+  },
+  "com/googlecode/javaewah#JavaEWAH/1.1.12": {
+   "jar": "sha256-sZIEMxrG4gS++vUIpo9S7GtGONnZus3b69Q1+cTVAPI=",
+   "pom": "sha256-BhhOmwWeCAkRgnE2r17Hj1fuTDvBn2MutWGw34+HiM4="
+  },
+  "commons-io#commons-io/2.11.0": {
+   "jar": "sha256-lhsvbYfbrMXVSr9Fq3puJJX4m3VZiWLYxyPOqbwhCQg=",
+   "pom": "sha256-LgFv1+MkS18sIKytg02TqkeQSG7h5FZGQTYaPoMe71k="
+  },
+  "gradle/plugin/com/github/johnrengelman#shadow/7.1.2": {
+   "jar": "sha256-v3BcwupcAYCqhwoPqAs5vxOhTScSjh6zpLZ0vjT1jpA=",
+   "pom": "sha256-H6qwvkF9ezxBqXzKCsqKWwtkBvw7Etfyjiw0Ex3/k0o="
+  },
+  "gradle/plugin/org/mikeneck#graalvm-native-image-plugin/1.4.1": {
+   "jar": "sha256-hxjq0IdN8UuGNB6IOkxkp3amRd0GbzcO2o+0xaPPZSI=",
+   "pom": "sha256-nNX2P1cnBVME1ZPa+uqiQK5dE/nZ3xn6meED8wc0lKo="
+  },
+  "org/apache#apache/23": {
+   "pom": "sha256-vBBiTgYj82V3+sVjnKKTbTJA7RUvttjVM6tNJwVDSRw="
+  },
+  "org/apache/ant#ant-launcher/1.10.11": {
+   "jar": "sha256-2rUw33qYC1rI/X6NIIJDrg0+vW3gmxqiznVjYMwu0lY=",
+   "pom": "sha256-7SoGiCYb624I7FSzgxLx1ILM8aO4Y8R9KNW5CkRtHB4="
+  },
+  "org/apache/ant#ant-parent/1.10.11": {
+   "pom": "sha256-V6BTJoLzD6MHQWoiWSnVcQrNpy17Je4IyvmNyCzTXbY="
+  },
+  "org/apache/ant#ant/1.10.11": {
+   "jar": "sha256-iMC4m7uq4B4Nn8rpO+eS9au+NAkQb47uhY/fNl28B1Q=",
+   "pom": "sha256-wiiU2ctGq/XOv27rK8z+TXjhju6jEaDqat3VnftLH+M="
+  },
+  "org/apache/commons#commons-parent/52": {
+   "pom": "sha256-ddvo806Y5MP/QtquSi+etMvNO18QR9VEYKzpBtu0UC4="
+  },
+  "org/apache/logging#logging-parent/3": {
+   "pom": "sha256-djouwrgJTUFh3rbCZLEmIIW5vjC/OjHCzhNyQuV3Iqc="
+  },
+  "org/apache/logging/log4j#log4j-api/2.17.1": {
+   "jar": "sha256-sNikyKtPuLGIjQCVgicDsObUeTxBlVAgPanmkZYWHeQ=",
+   "pom": "sha256-HirO8yILKb4QrgmXKLFYsY2UP5Ghk8xFAbtC+SnB6Io="
+  },
+  "org/apache/logging/log4j#log4j-core/2.17.1": {
+   "jar": "sha256-yWfyI0h5gLk2TpSnx/mooB/T7nwZvb8LD5+MuFEfPUE=",
+   "pom": "sha256-C7s79tTSKhv6PDwJJ8KUEK8UoPsm47Ark3JvXH6Yqv0="
+  },
+  "org/apache/logging/log4j#log4j/2.17.1": {
+   "pom": "sha256-lnq8AkRDqcsJaTVVmvXprW8P9hN1+Esn1EDS+nCAawk="
+  },
+  "org/codehaus/groovy#groovy-xml/3.0.10": {
+   "jar": "sha256-vCrVETWWo6m7ZQ2mRx8biRUFQheCF0p/5g15DttinoU=",
+   "pom": "sha256-Zwf5O1jO4BxBc/uuhNLh2DDKQc00LZBgbNW3GKn/fSk="
+  },
+  "org/codehaus/groovy#groovy/3.0.10": {
+   "jar": "sha256-3/762oKUhlvlA1UVwDIPtnlEPShfSl+K2tzwDBEw6Ew=",
+   "pom": "sha256-SYKt9KbGxQVnsL489JSCXmwqJ9izhx2eGIIqdCcreao="
+  },
+  "org/codehaus/plexus#plexus-utils/3.4.1": {
+   "jar": "sha256-UtheBLORhyKvEdEoVbSoJX35ag52yPTjhS5vqoUfNXs=",
+   "pom": "sha256-sUTP+bHGJZ/sT+5b38DzYNacI6vU6m5URTOpSbaeNYI="
+  },
+  "org/codehaus/plexus#plexus/8": {
+   "pom": "sha256-/6NJ2wTnq/ZYhb3FogYvQZfA/50/H04qpXILdyM/dCw="
+  },
+  "org/eclipse/jgit#org.eclipse.jgit-parent/5.13.0.202109080827-r": {
+   "pom": "sha256-oY/X0MQf2o2PHEoktQAKhmRWFHokdG7mzEcx54ihje4="
+  },
+  "org/eclipse/jgit#org.eclipse.jgit/5.13.0.202109080827-r": {
+   "jar": "sha256-2r+DafDN+M8Xt/faS9qTIMVwu3VMiOC+t7hSgSz1zSU=",
+   "pom": "sha256-qEF3Rc+i2V1qlxHpQT/KmE/FZmt2J7rRVAzyfUYq6BM="
+  },
+  "org/jdom#jdom2/2.0.6": {
+   "jar": "sha256-E0XxG6YG0VYD1nQFUajCGUfAIVZAdw7GcnH+eL6pfPU=",
+   "pom": "sha256-R7I6ef4za3QbgkNMbgSdaBZSVuQF51wQkh/XL6imXY0="
+  },
+  "org/jetbrains#annotations/13.0": {
+   "jar": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg=",
+   "pom": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
+  },
+  "org/jetbrains/kotlin#kotlin-stdlib-common/1.3.21": {
+   "jar": "sha256-zqYfe2EYleZPWFaal1f8CrDVgvEHIR4ZMODOKgrdUqc=",
+   "pom": "sha256-HkQzMKGrEIPdEjMesYI7zaGM06YWLtxTagNeTeHXhz0="
+  },
+  "org/jetbrains/kotlin#kotlin-stdlib/1.3.21": {
+   "jar": "sha256-OLojcNnwb1BDPgayyndblEc8LieF9BCSYHmreTxysDQ=",
+   "pom": "sha256-nOHqMzlsW/5I7IQSoM1WHsyQnXHI+TZZZ6FPnyT9uaU="
+  },
+  "org/junit#junit-bom/5.7.2": {
+   "module": "sha256-87zrHFndT2mT9DBN/6WAFyuN9lp2zTb6T9ksBXjSitg=",
+   "pom": "sha256-zRSqqGmZH4ICHFhdVw0x/zQry6WLtEIztwGTdxuWSHs="
+  },
+  "org/mikeneck/graalvm-native-image#org.mikeneck.graalvm-native-image.gradle.plugin/1.4.1": {
+   "pom": "sha256-vxSiyLGrQgrTQ+r8tt9YEbEtbZsn+mBcM/7yz9QZeW8="
+  },
+  "org/ow2#ow2/1.5": {
+   "pom": "sha256-D4obEW52C4/mOJxRuE5LB6cPwRCC1Pk25FO1g91QtDs="
+  },
+  "org/ow2/asm#asm-analysis/9.2": {
+   "jar": "sha256-h4++UhcxwHLRTS1luYOxvq5q0G/aAAe2qLroH3P0M8Q=",
+   "pom": "sha256-dzzBor/BTGxKl5xRoHXAI0oL9pT8Or5PrPRU83oUXxs="
+  },
+  "org/ow2/asm#asm-commons/9.2": {
+   "jar": "sha256-vkzlMTiiOLtSLNeBz5Hzulzi9sqT7GLUahYqEnIl4KY=",
+   "pom": "sha256-AoJOg58qLw5ylZ/dMLSJckDwWvxD3kLXugsYQ3YBwHA="
+  },
+  "org/ow2/asm#asm-tree/9.2": {
+   "jar": "sha256-qr+b0jCRpOv8EJwfPufPPkuJ9rotP1HFJD8Ws8/64BE=",
+   "pom": "sha256-9h8+vqVSDd8Z9FKwPEJscjG92KgdesKHZctScSJaw3g="
+  },
+  "org/ow2/asm#asm/9.2": {
+   "jar": "sha256-udT+TXGTjfOIOfDspCqqpkz4sxPWeNoDbwyzyhmbR/U=",
+   "pom": "sha256-37EqGyJL8Bvh/WBAIEZviUJBvLZF3M45Xt2M1vilDfQ="
+  },
+  "org/slf4j#slf4j-api/1.7.30": {
+   "jar": "sha256-zboHlk0btAoHYUhcax6ML4/Z6x0ZxTkorA1/lRAQXFc=",
+   "pom": "sha256-fgdHdR6bZ+Gdy1IG8E6iLMA9JQxCJCZALq3QNRPywxQ="
+  },
+  "org/slf4j#slf4j-parent/1.7.30": {
+   "pom": "sha256-EWR5VuSKDFv7OsM/bafoPzQQAraFfv0zWlBbaHvjS3U="
+  },
+  "org/sonatype/oss#oss-parent/5": {
+   "pom": "sha256-FnjUEgpYXYpjATGu7ExSTZKDmFg7fqthbufVqH9SDT0="
+  },
+  "org/sonatype/oss#oss-parent/7": {
+   "pom": "sha256-tR+IZ8kranIkmVV/w6H96ne9+e9XRyL+kM5DailVlFQ="
+  },
+  "org/vafer#jdependency/2.7.0": {
+   "jar": "sha256-1j79V0b/QIlDp91++Frp8Jqn+2O7KxaRFCfObEW1n9A=",
+   "pom": "sha256-6yRCKwo+nofVrG6oCHeG+1HEsbvg0iXvdSFSxzaiBNA="
+  }
+ },
+ "https://repo.maven.apache.org/maven2/org": {
+  "apache#apache/23": {
+   "pom": "sha256-vBBiTgYj82V3+sVjnKKTbTJA7RUvttjVM6tNJwVDSRw="
+  },
+  "apache/commons#commons-lang3/3.12.0": {
+   "jar": "sha256-2RnZBEhsA3+NGTQS2gyS4iqfokIwudZ6V4VcXDHH6U4=",
+   "pom": "sha256-gtMfHcxFg+/9dE6XkWWxbaZL+GvKYj/F0bA+2U9FyFo="
+  },
+  "apache/commons#commons-parent/52": {
+   "pom": "sha256-ddvo806Y5MP/QtquSi+etMvNO18QR9VEYKzpBtu0UC4="
+  },
+  "bouncycastle#bcprov-jdk18on/1.71": {
+   "jar": "sha256-80M6l9eA/p+j3D1WKkHezVmy5hfOiE3pBgNJrBR1AEU=",
+   "pom": "sha256-u90garzosxsfGnMBORtEO6bN4X5y3udcH9LkEBFsXIc="
+  },
+  "junit#junit-bom/5.7.1": {
+   "module": "sha256-mFTjiU1kskhSB+AEa8oHs9QtFp54L0+oyc4imnj67gQ=",
+   "pom": "sha256-C5sUo9YhBvr+jGinF7h7h60YaFiZRRt1PAT6QbaFd4Q="
+  }
+ }
+}
diff --git a/pkgs/tools/typesetting/pulldown-cmark/default.nix b/pkgs/tools/typesetting/pulldown-cmark/default.nix
index b77c5984a7a78..be71ffd8bd752 100644
--- a/pkgs/tools/typesetting/pulldown-cmark/default.nix
+++ b/pkgs/tools/typesetting/pulldown-cmark/default.nix
@@ -5,17 +5,17 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "pulldown-cmark";
-  version = "0.10.3";
+  version = "0.12.1";
 
   src = fetchCrate {
     inherit pname version;
-    hash = "sha256-lJTMMXjuam872p+3+uesODd3s3/IJFg476AssikhI48=";
+    hash = "sha256-PfkmzmK98Mzay6P48NTEJhtpuoCiTb3JqUIYObcS41k=";
   };
 
-  cargoHash = "sha256-P0Wem+iEnjq+iyJYw0QqwFQ7UuG/BMKEUernykjg44o=";
+  cargoHash = "sha256-BhlKFisM1ho7xcwBnjtODQdacE/B9UoqYXj3dIAeTXE=";
 
   meta = {
-    description = "A pull parser for CommonMark written in Rust";
+    description = "Pull parser for CommonMark written in Rust";
     homepage = "https://github.com/raphlinus/pulldown-cmark";
     license = with lib.licenses; [ mit ];
     maintainers = with lib.maintainers; [ CobaltCause ];
diff --git a/pkgs/tools/typesetting/rubber/default.nix b/pkgs/tools/typesetting/rubber/default.nix
index 2ccee0bae005e..641dade6457f7 100644
--- a/pkgs/tools/typesetting/rubber/default.nix
+++ b/pkgs/tools/typesetting/rubber/default.nix
@@ -1,29 +1,29 @@
 { lib, stdenv, fetchFromGitLab, python3Packages, texinfo }:
 
-python3Packages.buildPythonApplication rec {
+let
+  pypkgs = python3Packages;
+
+in
+pypkgs.buildPythonApplication rec {
   pname = "rubber";
-  version = "1.6.0";
+  version = "1.6.6";
+  pyproject = true;
 
   src = fetchFromGitLab {
     owner = "latex-rubber";
     repo = "rubber";
     rev = version;
-    hash = "sha256-7sv9N3PES5N41yYyXNWfaZ6IhLW6SqMiCHdamsSPQzg=";
+    hash = "sha256-C26PN3jyV6qwSjgPem54bykZrpKj+n8iHYYUyR+8dgI=";
   };
 
-  # I'm sure there is a better way to pass these parameters to the build script...
   postPatch = ''
-    substituteInPlace setup.py \
-      --replace 'pdf = True' 'pdf = False' \
-      --replace '$base/info'  'share/info' \
-      --replace '$base/man'   'share/man' \
-      --replace '$base/share' 'share'
+    sed -i -e '/texi2dvi/d' hatch_build.py
 
     substituteInPlace tests/run.sh \
-      --replace /var/tmp /tmp
+      --replace-fail /var/tmp /tmp
   '';
 
-  nativeBuildInputs = [ texinfo ];
+  nativeBuildInputs = [ pypkgs.hatchling texinfo ];
 
   checkPhase = ''
     runHook preCheck
diff --git a/pkgs/tools/typesetting/satysfi/default.nix b/pkgs/tools/typesetting/satysfi/default.nix
index 64bd2a80fff5a..c4e1a9980fe05 100644
--- a/pkgs/tools/typesetting/satysfi/default.nix
+++ b/pkgs/tools/typesetting/satysfi/default.nix
@@ -64,7 +64,7 @@ in
 
     meta = with lib; {
       homepage = "https://github.com/gfngfn/SATySFi";
-      description = "A statically-typed, functional typesetting system";
+      description = "Statically-typed, functional typesetting system";
       changelog = "https://github.com/gfngfn/SATySFi/blob/v${version}/CHANGELOG.md";
       license = licenses.lgpl3Only;
       maintainers = [ maintainers.mt-caret ];
diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix
index 61329037c9612..b6a77b55f6851 100644
--- a/pkgs/tools/typesetting/sile/default.nix
+++ b/pkgs/tools/typesetting/sile/default.nix
@@ -121,7 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
   outputs = [ "out" "doc" "man" "dev" ];
 
   meta = with lib; {
-    description = "A typesetting system";
+    description = "Typesetting system";
     longDescription = ''
       SILE is a typesetting system; its job is to produce beautiful
       printed documents. Conceptually, SILE is similar to TeX—from
diff --git a/pkgs/tools/typesetting/skribilo/default.nix b/pkgs/tools/typesetting/skribilo/default.nix
deleted file mode 100644
index 548b75621c3bb..0000000000000
--- a/pkgs/tools/typesetting/skribilo/default.nix
+++ /dev/null
@@ -1,74 +0,0 @@
-{ lib
-, stdenv
-, fetchurl
-, fig2dev
-, gettext
-, ghostscript
-, guile
-, guile-lib
-, guile-reader
-, imagemagick
-, makeWrapper
-, pkg-config
-, enableEmacs ? false, emacs
-, enableLout ? stdenv.isLinux, lout
-, enablePloticus ? stdenv.isLinux, ploticus
-, enableTex ? true, texliveSmall
-}:
-
-let
-  inherit (lib) optional;
-in stdenv.mkDerivation (finalAttrs: {
-  pname = "skribilo";
-  version = "0.10.0";
-
-  src = fetchurl {
-    url = "http://download.savannah.nongnu.org/releases/skribilo/skribilo-${finalAttrs.version}.tar.gz";
-    hash = "sha256-jP9I7hds7f1QMmSaNJpGlSvqUOwGcg+CnBzMopIS9Q4=";
-  };
-
-  nativeBuildInputs = [
-    makeWrapper
-    pkg-config
-  ];
-
-  buildInputs = [
-    fig2dev
-    gettext
-    ghostscript
-    guile
-    guile-lib
-    guile-reader
-    imagemagick
-  ]
-  ++ optional enableEmacs emacs
-  ++ optional enableLout lout
-  ++ optional enablePloticus ploticus
-  ++ optional enableTex texliveSmall;
-
-  postInstall = ''
-    wrapProgram $out/bin/skribilo \
-      --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
-      --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
-  '';
-
-  meta = {
-    homepage = "https://www.nongnu.org/skribilo/";
-    description = "The Ultimate Document Programming Framework";
-    longDescription = ''
-      Skribilo is a free document production tool that takes a structured
-      document representation as its input and renders that document in a
-      variety of output formats: HTML and Info for on-line browsing, and Lout
-      and LaTeX for high-quality hard copies.
-
-      The input document can use Skribilo's markup language to provide
-      information about the document's structure, which is similar to HTML or
-      LaTeX and does not require expertise. Alternatively, it can use a simpler,
-      "markup-less" format that borrows from Emacs' outline mode and from other
-      conventions used in emails, Usenet and text.
-    '';
-    license = lib.licenses.gpl3Plus;
-    maintainers = with lib.maintainers; [ AndersonTorres ];
-    platforms = lib.platforms.unix;
-  };
-})
diff --git a/pkgs/tools/typesetting/sshlatex/default.nix b/pkgs/tools/typesetting/sshlatex/default.nix
index ed1252928bb3e..a163c934e46d1 100644
--- a/pkgs/tools/typesetting/sshlatex/default.nix
+++ b/pkgs/tools/typesetting/sshlatex/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    description = "A collection of hacks to efficiently run LaTeX via ssh";
+    description = "Collection of hacks to efficiently run LaTeX via ssh";
     longDescription = ''
       sshlatex is a tool which uploads LaTeX source files to a remote, runs
       LaTeX there, and streams the resulting PDF file to the local host.
diff --git a/pkgs/tools/typesetting/tectonic/default.nix b/pkgs/tools/typesetting/tectonic/default.nix
index 3320e91e51b99..0cc8b18de92a2 100644
--- a/pkgs/tools/typesetting/tectonic/default.nix
+++ b/pkgs/tools/typesetting/tectonic/default.nix
@@ -16,6 +16,7 @@
 , openssl
 , pkg-config
 , icu
+, fetchpatch2
 }:
 
 rustPlatform.buildRustPackage rec {
@@ -29,7 +30,15 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-xZHYiaQ8ASUwu0ieHIXcjRaH06SQoB6OR1y7Ok+FjAs=";
   };
 
-  cargoHash = "sha256-niMgb4zsTWHw5yaa4kJOZzpOzO5gMG4k3cTHwSV+wmY=";
+  cargoPatches = [
+    # fix build with rust 1.80
+    (fetchpatch2 {
+      url = "https://github.com/tectonic-typesetting/tectonic/commit/6b49ca8db40aaca29cb375ce75add3e575558375.patch";
+      hash = "sha256-i1L3XaSuBbsmgOSXIWVqr6EHlHGs8A+6v06kJ3C50sk=";
+    })
+  ];
+
+  cargoHash = "sha256-Zn+xU6NJOY+jDYrSGsbYGAVqprQ6teEdNvlTNDXuzKs=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/tools/typesetting/tectonic/tests.nix b/pkgs/tools/typesetting/tectonic/tests.nix
index eac66f19599e0..802e0812e8c85 100644
--- a/pkgs/tools/typesetting/tectonic/tests.nix
+++ b/pkgs/tools/typesetting/tectonic/tests.nix
@@ -62,7 +62,6 @@ let
         the `tectonic` derivation is updated.
       */
       inherit (emptyFile)
-        outputHashAlgo
         outputHashMode
         outputHash
         ;
diff --git a/pkgs/tools/typesetting/ted/default.nix b/pkgs/tools/typesetting/ted/default.nix
index eb9178c33b83a..4cff637d7706e 100644
--- a/pkgs/tools/typesetting/ted/default.nix
+++ b/pkgs/tools/typesetting/ted/default.nix
@@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
       Acrobat PDF converter.
     '';
     homepage    = "https://nllgg.nl/Ted/";
-    license     = licenses.gpl2;
+    license     = licenses.gpl2Only;
     platforms   = platforms.all;
     broken      = stdenv.isDarwin;
     maintainers = with maintainers; [ obadz ];
diff --git a/pkgs/tools/typesetting/tex/advi/default.nix b/pkgs/tools/typesetting/tex/advi/default.nix
index ff20a10c5cf45..05262a3f2c01c 100644
--- a/pkgs/tools/typesetting/tex/advi/default.nix
+++ b/pkgs/tools/typesetting/tex/advi/default.nix
@@ -64,7 +64,7 @@ ocamlPackages.buildDunePackage rec {
 
   meta = with lib; {
     homepage = "http://advi.inria.fr/";
-    description = "A Unix-platform DVI previewer and a programmable presenter for slides written in LaTeX";
+    description = "Unix-platform DVI previewer and a programmable presenter for slides written in LaTeX";
     license = licenses.lgpl21Only;
     maintainers = [ maintainers.xworld21 ];
   };
diff --git a/pkgs/tools/typesetting/tex/blahtexml/default.nix b/pkgs/tools/typesetting/tex/blahtexml/default.nix
index fb7605924023a..9d88ac3b0be60 100644
--- a/pkgs/tools/typesetting/tex/blahtexml/default.nix
+++ b/pkgs/tools/typesetting/tex/blahtexml/default.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     homepage = "http://gva.noekeon.org/blahtexml/";
-    description = "A TeX to MathML converter";
+    description = "TeX to MathML converter";
     longDescription = ''
       Blahtex is a program written in C++, which converts an equation given in
       a syntax close to TeX into MathML. It is designed by David Harvey and is
diff --git a/pkgs/tools/typesetting/tex/catdvi/default.nix b/pkgs/tools/typesetting/tex/catdvi/default.nix
index 1958a2f4c0734..03fedbbc386d9 100644
--- a/pkgs/tools/typesetting/tex/catdvi/default.nix
+++ b/pkgs/tools/typesetting/tex/catdvi/default.nix
@@ -84,8 +84,8 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     homepage = "http://catdvi.sourceforge.net";
-    description = "A DVI to plain text translator";
-    license = licenses.gpl2;
+    description = "DVI to plain text translator";
+    license = licenses.gpl2Plus;
     maintainers = [ ];
   };
 })
diff --git a/pkgs/tools/typesetting/tex/dblatex/default.nix b/pkgs/tools/typesetting/tex/dblatex/default.nix
index d615cefd77c38..39069029e57c5 100644
--- a/pkgs/tools/typesetting/tex/dblatex/default.nix
+++ b/pkgs/tools/typesetting/tex/dblatex/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, python3, libxslt, texliveBasic
+{ lib, stdenv, fetchurl, python311, libxslt, texliveBasic
 , enableAllFeatures ? false, imagemagick, fig2dev, inkscape, fontconfig, ghostscript
 
 , tex ? texliveBasic.withPackages (ps: with ps; [ # satisfy all packages that ./configure mentions
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     sha256 = "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n";
   };
 
-  buildInputs = [ python3 libxslt tex ]
+  buildInputs = [ python311 libxslt tex ]
     ++ lib.optionals enableAllFeatures [ imagemagick fig2dev ];
 
   # TODO: dblatex tries to execute texindy command, but nixpkgs doesn't have
@@ -52,13 +52,13 @@ stdenv.mkDerivation rec {
   dontBuild = true;
 
   installPhase = ''
-    ${python3.interpreter} ./setup.py install --prefix="$out" --use-python-path --verbose
+    ${python311.interpreter} ./setup.py install --prefix="$out" --use-python-path --verbose
   '';
 
   passthru = { inherit tex; };
 
   meta = {
-    description = "A program to convert DocBook to DVI, PostScript or PDF via LaTeX or ConTeXt";
+    description = "Program to convert DocBook to DVI, PostScript or PDF via LaTeX or ConTeXt";
     mainProgram = "dblatex";
     homepage = "https://dblatex.sourceforge.net/";
     license = lib.licenses.gpl2Plus;
diff --git a/pkgs/tools/typesetting/tex/latexrun/default.nix b/pkgs/tools/typesetting/tex/latexrun/default.nix
index ea2c630e79605..5cab85a1cc1ff 100644
--- a/pkgs/tools/typesetting/tex/latexrun/default.nix
+++ b/pkgs/tools/typesetting/tex/latexrun/default.nix
@@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation {
   '';
 
   meta = with lib; {
-    description = "A 21st century LaTeX wrapper";
+    description = "21st century LaTeX wrapper";
     mainProgram = "latexrun";
     homepage = "https://github.com/aclements/latexrun";
     license = licenses.mit;
diff --git a/pkgs/tools/typesetting/tex/nix/default.nix b/pkgs/tools/typesetting/tex/nix/default.nix
index e9017333c943c..feb444b98ff49 100644
--- a/pkgs/tools/typesetting/tex/nix/default.nix
+++ b/pkgs/tools/typesetting/tex/nix/default.nix
@@ -243,7 +243,7 @@ rec {
   # fonts.
   fontsConf = pkgs.makeFontsConf {
     fontDirectories = [
-      "${pkgs.ghostscript}/share/ghostscript/fonts"
+      "${pkgs.ghostscript.fonts}/share/fonts"
     ];
   };
 
diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix
deleted file mode 100644
index 25c65d081911d..0000000000000
--- a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchFromGitHub
-}:
-
-stdenvNoCC.mkDerivation (finalAttrs: {
-  pname = "pgf";
-  version = "1.18";
-
-  src = fetchFromGitHub {
-    owner = "pgf-tikz";
-    repo = "pgf";
-    rev = "refs/tags/version-${lib.replaceStrings ["."] ["-"] finalAttrs.version}";
-    hash = "sha256-WZ/191iEDd5VK1bnV9JZx2BZfACUeAUhAqrlyx+ZvA4=";
-  };
-
-  dontConfigure = true;
-  dontBuild = true;
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/share/texmf-nix
-    cp -prd context doc generic latex plain $out/share/texmf-nix/
-
-    runHook postInstall
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/pgf-tikz/pgf";
-    description = "A Portable Graphic Format for TeX - version ${finalAttrs.version}";
-    branch = lib.versions.major version;
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = platforms.unix;
-  };
-})
diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-2.x.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-2.x.nix
deleted file mode 100644
index d25e1bd84904f..0000000000000
--- a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-2.x.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchFromGitHub
-}:
-
-stdenvNoCC.mkDerivation (finalAttrs: {
-  pname = "pgf";
-  version = "2.10";
-
-  src = fetchFromGitHub {
-    owner = "pgf-tikz";
-    repo = "pgf";
-    rev = "refs/tags/${finalAttrs.version}";
-    hash = "sha256-AA+XFhEkJifODJb6SppnxhR4lMlMNaH+k10UF6QisJ8=";
-  };
-
-  dontConfigure = true;
-  dontBuild = true;
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/share/texmf-nix
-    cp -prd context doc generic latex plain $out/share/texmf-nix/
-
-    runHook postInstall
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/pgf-tikz/pgf";
-    description = "A Portable Graphic Format for TeX";
-    branch = lib.versions.major version;
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = platforms.unix;
-  };
-})
diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix
deleted file mode 100644
index 6fabce3d7316a..0000000000000
--- a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchFromGitHub
-}:
-
-stdenvNoCC.mkDerivation (finalAttrs: {
-  pname = "pgf";
-  version = "3.1.10";
-
-  src = fetchFromGitHub {
-    owner = "pgf-tikz";
-    repo = "pgf";
-    rev = "refs/tags/${finalAttrs.version}";
-    hash = "sha256-/zU2aTV39XpQhSpHVi8pBNsaAshcIhl6s+vOL1SO3Vw=";
-  };
-
-  dontConfigure = true;
-  dontBuild = true;
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/share/texmf-nix
-    cp -prd doc source tex/{context,generic,latex,plain} $out/share/texmf-nix/
-
-    runHook postInstall
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/pgf-tikz/pgf";
-    description = "A Portable Graphic Format for TeX - version ${finalAttrs.version}";
-    branch = lib.versions.major version;
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = platforms.unix;
-  };
-})
diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-pie.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-pie.nix
deleted file mode 100644
index 4c8bf800e4620..0000000000000
--- a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-pie.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchFromGitHub
-}:
-
-stdenvNoCC.mkDerivation (finalAttrs: {
-  pname = "pgf-pie";
-  version = "0.7";
-
-  src = fetchFromGitHub {
-    owner = "pgf-tikz";
-    repo = "pgf-pie";
-    rev = "refs/tags/${finalAttrs.version}";
-    hash = "sha256-tAUv35AMgJW5JI2KIXxxXFihqdB7qbMmNpAYhpDbAxs=";
-  };
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/share/texmf-nix
-    cp -prd doc tex/latex $out/share/texmf-nix/
-
-    runHook postInstall
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/pgf-tikz/pgf-pie";
-    description = "Some LaTeX macros for pie charts using the PGF/TikZ package";
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = platforms.unix;
-  };
-})
diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix
deleted file mode 100644
index 293fa6b52e377..0000000000000
--- a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchFromGitHub
-}:
-
-stdenvNoCC.mkDerivation (finalAttrs: {
-  pname = "pgf-umlcd";
-  version = "0.3";
-
-  src = fetchFromGitHub {
-    owner = "pgf-tikz";
-    repo = "pgf-umlcd";
-    rev = "refs/tags/${finalAttrs.version}";
-    hash = "sha256-92bfBcQfnalYoVxlVRjbRXhWt+CbS8PtiMmFIqbgo7A=";
-  };
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/share/texmf-nix
-    cp -prd doc tex/latex $out/share/texmf-nix/
-
-    runHook postInstall
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/pgf-tikz/pgf-umlcd";
-    description = "Some LaTeX macros for UML Class Diagrams";
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = platforms.unix;
-  };
-})
diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix
deleted file mode 100644
index 4fd32aadf8ce2..0000000000000
--- a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchFromGitHub
-}:
-
-stdenvNoCC.mkDerivation {
-  pname = "pgf-umlcd";
-  version = "unstable-2020-05-28";
-
-  src = fetchFromGitHub {
-    owner = "pgf-tikz";
-    repo = "pgf-umlsd";
-    rev = "8766cc18596dbfa66202ceca01c62cab1c3ed6a2";
-    hash = "sha256-gSBO7uDPMer9XyHfs0rr+2lricN5Nb4cOlShCsk0cPc=";
-  };
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/share/texmf-nix
-    cp -prd doc tex/latex $out/share/texmf-nix/
-
-    runHook postInstall
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/pgf-tikz/pgf-umlsd";
-    description = "Some LaTeX macros for UML Sequence Diagrams";
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = platforms.unix;
-  };
-}
diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix
deleted file mode 100644
index 559b34f34ad05..0000000000000
--- a/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchFromGitHub
-}:
-
-stdenvNoCC.mkDerivation (finalAttrs: {
-  pname = "pgfplots";
-  version = "1.18.1";
-
-  src = fetchFromGitHub {
-    owner = "pgf-tikz";
-    repo = "pgfplots";
-    rev = "refs/tags/${finalAttrs.version}";
-    hash = "sha256-cTfOMasBptm0lydKeNHPnjdEyFjEb88awYPn8S2m73c=";
-  };
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/share/texmf-nix
-    cp -prd doc tex/{context,generic,latex,plain} $out/share/texmf-nix/
-
-    runHook postInstall
-  '';
-
-  meta = with lib; {
-    homepage = "https://pgfplots.sourceforge.net";
-    description = "TeX package to draw plots directly in TeX in two and three dimensions";
-    license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = platforms.unix;
-  };
-})
diff --git a/pkgs/tools/typesetting/tex/pplatex/default.nix b/pkgs/tools/typesetting/tex/pplatex/default.nix
index 367daa9450fc3..7bd1e4d0eb1ea 100644
--- a/pkgs/tools/typesetting/tex/pplatex/default.nix
+++ b/pkgs/tools/typesetting/tex/pplatex/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
     mainProgram = "pplatex";
     homepage = "https://github.com/stefanhepp/pplatex";
     license = licenses.gpl3Plus;
-    maintainers = [ maintainers.srgom maintainers.doronbehar ];
+    maintainers = [ maintainers.doronbehar ];
     platforms = platforms.unix;
   };
 })
diff --git a/pkgs/tools/typesetting/tex/tetex/default.nix b/pkgs/tools/typesetting/tex/tetex/default.nix
index d153864172187..6000a13ec6212 100644
--- a/pkgs/tools/typesetting/tex/tetex/default.nix
+++ b/pkgs/tools/typesetting/tex/tetex/default.nix
@@ -31,6 +31,11 @@ stdenv.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
+  env = {
+    CFLAGS = "-std=gnu89";
+    CXXFLAGS = "-std=c++03";
+  };
+
   configureFlags =
     [ "--disable-multiplatform" "--without-x11" "--without-xdvik"
       "--without-oxdvik" "--without-texinfo" "--without-texi2html"
@@ -47,7 +52,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    description  = "A full-featured (La)TeX distribution";
+    description  = "Full-featured (La)TeX distribution";
     homepage     = "http://www.tug.org/tetex/";
     maintainers  = with maintainers; [ lovek323 ];
     platforms    = platforms.unix;
diff --git a/pkgs/tools/typesetting/tex/tex-match/default.nix b/pkgs/tools/typesetting/tex/tex-match/default.nix
index c7d961d21fc1f..18dffb657c89f 100644
--- a/pkgs/tools/typesetting/tex/tex-match/default.nix
+++ b/pkgs/tools/typesetting/tex/tex-match/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = [ gtk3 ];
 
-  cargoSha256 = "13ihwrckpsb4j1ai923vh151frw0yriwg9yylj9lk0ycps51y1sn";
+  cargoHash = "sha256-Vgcfir7Mg0mTpN6nx2P2gGcXSoB7iBRVkGTpO1nmMI4=";
 
   meta = with lib; {
     description = "Search through over 1000 different LaTeX symbols by sketching. A desktop version of detexify";
diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix
index ece8a36aa5536..d712b48b8cea8 100644
--- a/pkgs/tools/typesetting/tex/texlive/bin.nix
+++ b/pkgs/tools/typesetting/tex/texlive/bin.nix
@@ -239,7 +239,7 @@ core-big = stdenv.mkDerivation {
     # to the version vendored by texlive (2.1.0-beta3)
     (fetchpatch {
       name = "luajit-fix-aarch64-linux.patch";
-      url = "https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/LuaJIT/patches/e9af1abec542e6f9851ff2368e7f196b6382a44c.patch";
+      url = "https://raw.githubusercontent.com/void-linux/void-packages/30253fbfc22cd93d97ec53df323778a3aab82754/srcpkgs/LuaJIT/patches/e9af1abec542e6f9851ff2368e7f196b6382a44c.patch";
       hash = "sha256-ysSZmfpfCFMukfHmIqwofAZux1e2kEq/37lfqp7HoWo=";
       stripLen = 1;
       extraPrefix = "libs/luajit/LuaJIT-src/";
@@ -320,7 +320,11 @@ context = stdenv.mkDerivation rec {
   version = "2.10.08";
 
   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?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=";
   };
 
@@ -328,7 +332,7 @@ context = stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ninja ];
 
   meta = with lib; {
-    description = "The LUAMETATEX engine is a follow up on LUATEX and is again part of CONTEXT development";
+    description = "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 ];
diff --git a/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix b/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix
index 5497e6b6dd4bd..ed0f0fd39377e 100644
--- a/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix
+++ b/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix
@@ -35,6 +35,8 @@ lib.fix (self: {
 , __combine ? false
 # adjust behavior further if called from the texlive.combine wrapper
 , __fromCombineWrapper ? false
+# build only the formats of a package (for internal use!)
+, __formatsOf ? null
 }@args:
 
 let
@@ -56,13 +58,12 @@ let
     # resolve dependencies of the packages that affect the runtime
     all =
       let
-        # order of packages is irrelevant
-        packages = builtins.sort (a: b: a.pname < b.pname) (ensurePkgSets (requiredTeXPackages tl));
+        packages = ensurePkgSets (requiredTeXPackages tl);
         runtime = builtins.partition
           (p: p.outputSpecified or false -> builtins.elem (p.tlOutputName or p.outputName) [ "out" "tex" "tlpkg" ])
           packages;
         keySet = p: {
-          key = ((p.name or "${p.pname}-${p.version}") + "-" + p.tlOutputName or p.outputName or "");
+          key = p.pname or p.name + lib.optionalString (p.outputSpecified or false) ("-" + p.tlOutputName or p.outputName or "");
           inherit p;
           tlDeps = if p ? tlDeps then ensurePkgSets p.tlDeps else (p.requiredTeXPackages or (_: [ ]) tl);
         };
@@ -116,7 +117,8 @@ let
     hyphenPatterns = lib.filter (p: p ? hyphenPatterns && (p.tlOutputName or p.outputName == "tex")) nonbin;
     sortedHyphenPatterns = builtins.sort (a: b: a.pname < b.pname) hyphenPatterns;
     formatPkgs = lib.filter (p: p ? formats && (p.outputSpecified or false -> p.tlOutputName or p.outputName == "tex") && builtins.any (f: f.enabled or true) p.formats) all;
-    sortedFormatPkgs = builtins.sort (a: b: a.pname < b.pname) formatPkgs;
+    sortedFormatPkgs = if __formatsOf != null then [ __formatsOf ] else builtins.sort (a: b: a.pname < b.pname) formatPkgs;
+    formats = map (p: self { requiredTeXPackages = ps: [ ps.scheme-infraonly p ] ++ hyphenPatterns; __formatsOf = p; }) sortedFormatPkgs;
   };
 
   # list generated by inspecting `grep -IR '\([^a-zA-Z]\|^\)gs\( \|$\|"\)' "$TEXMFDIST"/scripts`
@@ -125,7 +127,7 @@ let
   needsGhostscript = lib.any (p: lib.elem p.pname [ "context" "dvipdfmx" "latex-papersize" "lyluatex" ]) pkgList.bin;
 
   name = if __combine then "texlive-${__extraName}-${bin.texliveYear}${__extraVersion}" # texlive.combine: old name name
-    else "texlive-${bin.texliveYear}-env";
+    else "texlive-${bin.texliveYear}-" + (if __formatsOf != null then "${__formatsOf.pname}-fmt" else "env");
 
   texmfdist = buildEnv' {
     name = "${name}-texmfdist";
@@ -208,7 +210,7 @@ let
     __overrideTeXConfig = newArgs:
       let appliedArgs = if builtins.isFunction newArgs then newArgs args else newArgs; in
         self (args // { __fromCombineWrapper = false; } // appliedArgs);
-    withPackages = reqs: self (args // { requiredTeXPackages = ps: requiredTeXPackages ps ++ reqs ps; __fromCombineWrapper = false; });
+    withPackages = reqs: self (args // { requiredTeXPackages = ps: reqs ps ++ requiredTeXPackages ps; __fromCombineWrapper = false; });
   };
 
   # TeXLive::TLOBJ::fmtutil_cnf_lines
@@ -260,11 +262,11 @@ buildEnv' {
   inherit name;
 
   # use attrNames, attrValues to ensure the two lists are sorted in the same way
-  outputs = [ "out" ] ++ lib.optionals (! __combine) (builtins.attrNames nonEnvOutputs);
-  otherOutputs = lib.optionals (! __combine) (builtins.attrValues nonEnvOutputs);
+  outputs = [ "out" ] ++ lib.optionals (! __combine && __formatsOf == null) (builtins.attrNames nonEnvOutputs);
+  otherOutputs = lib.optionals (! __combine && __formatsOf == null) (builtins.attrValues nonEnvOutputs);
 
   # remove fake derivations (without 'outPath') to avoid undesired build dependencies
-  paths = builtins.catAttrs "outPath" pkgList.bin
+  paths = builtins.catAttrs "outPath" pkgList.bin ++ lib.optionals (! __combine && __formatsOf == null) pkgList.formats
     ++ lib.optional __combine doc;
   pathsToLink = [
     "/"
@@ -286,7 +288,8 @@ buildEnv' {
 
   buildInputs = [ coreutils gawk gnugrep gnused ] ++ lib.optional needsGhostscript ghostscript;
 
-  inherit meta passthru;
+  inherit meta passthru __combine;
+  __formatsOf = __formatsOf.pname or null;
 
   inherit texmfdist texmfroot;
 
@@ -304,6 +307,9 @@ buildEnv' {
   postBuild = ''
     . "${./build-tex-env.sh}"
   '';
+
+  allowSubstitutes = true;
+  preferLocalBuild = false;
 };
   # outputsToInstall must be set *after* overrideAttrs (used in buildEnv') or it fails the checkMeta tests
-in if __combine then out else lib.addMetaAttrs { inherit (pkgList) outputsToInstall; } out)
+in if __combine || __formatsOf != null then out else lib.addMetaAttrs { inherit (pkgList) outputsToInstall; } out)
diff --git a/pkgs/tools/typesetting/tex/texlive/build-tex-env.sh b/pkgs/tools/typesetting/tex/texlive/build-tex-env.sh
index 834b2e0e7651f..baa508047f846 100644
--- a/pkgs/tools/typesetting/tex/texlive/build-tex-env.sh
+++ b/pkgs/tools/typesetting/tex/texlive/build-tex-env.sh
@@ -143,7 +143,10 @@ installtl_do_postinst_stuff () {
     # in principle, we could use writeText and share them across different
     # environments, but the eval & build overhead is not worth the savings
     tlutils_create_fmtutil
-    tlutils_create_updmap
+    # can be skipped if generating formats only
+    if [[ -z $__formatsOf ]] ; then
+        tlutils_create_updmap
+    fi
     tlutils_create_language_dat
     tlutils_create_language_def
     tlutils_create_language_lua
@@ -152,21 +155,24 @@ installtl_do_postinst_stuff () {
     tlutils_info "running mktexlsr $TEXMFSYSVAR $TEXMFSYSCONFIG"
     mktexlsr "$TEXMFSYSVAR" "$TEXMFSYSCONFIG"
 
-    # update font maps
-    tlutils_info "generating font maps"
-    updmap-sys --quiet --force --nohash 2>&1
-    # configure the paper size
-    # tlmgr --no-execute-actions paper letter
-    # install-tl: "rerun mktexlsr for updmap-sys and tlmgr paper updates"
-    tlutils_info "re-running mktexlsr $TEXMFSYSVAR $TEXMFSYSCONFIG"
-    mktexlsr "$TEXMFSYSVAR" "$TEXMFSYSCONFIG"
-
-    tlutils_update_context_cache
+    # can be skipped if generating formats only
+    if [[ -z $__formatsOf ]] ; then
+        # update font maps
+        tlutils_info "generating font maps"
+        updmap-sys --quiet --force --nohash 2>&1
+        # configure the paper size
+        # tlmgr --no-execute-actions paper letter
+        # install-tl: "rerun mktexlsr for updmap-sys and tlmgr paper updates"
+        tlutils_info "re-running mktexlsr $TEXMFSYSVAR $TEXMFSYSCONFIG"
+        mktexlsr "$TEXMFSYSVAR" "$TEXMFSYSCONFIG"
+
+        tlutils_update_context_cache
+    fi
 
     # generate formats
     # install-tl would run fmtutil-sys $common_fmtutil_args --no-strict --all
     # instead, we want fmtutil to exit with error on failure
-    if [[ -n $fmtutilCnf ]] ; then
+    if [[ -n $fmtutilCnf && -n $__combine$__formatsOf ]] ; then
         tlutils_info "pre-generating all format files, be patient..."
         # many formats still ignore SOURCE_DATE_EPOCH even when FORCE_SOURCE_DATE=1
         # libfaketime fixes non-determinism related to timestamps ignoring FORCE_SOURCE_DATE
@@ -177,6 +183,24 @@ installtl_do_postinst_stuff () {
         substitute "$texmfdist"/scripts/texlive/fmtutil.pl fmtutil \
             --replace-fail "my \$cmdline = \"\$eng -ini " "my \$cmdline = \"faketime -f '\@$(date +'%F %T' --date=@"$SOURCE_DATE_EPOCH") x0.001' \$eng -ini "
         FORCE_SOURCE_DATE=1 perl fmtutil --quiet --strict --sys --all 2>&1 | grep '^fmtutil' # too verbose
+
+        # if generating formats only, delete everything else and exit
+        if [[ -n $__formatsOf ]] ; then
+            # see fmtutil.pl::compute_format_destination for file extensions
+            find "$out" \( -type f -or -type l \) \
+                -not -path "$TEXMFSYSVAR/*.mem" \
+                -not -path "$TEXMFSYSVAR/*.base" \
+                -not -path "$TEXMFSYSVAR/*.fmt" \
+                -delete
+            find "$out" -type d -empty -delete
+            exit
+        fi
+    elif [[ -z $__combine ]] ; then
+        # double check that all formats are present
+        if fmtutil --quiet --strict --sys --missing --dry-run 2>&1 | grep running ; then
+            tlutils_info 'formats not found, aborting'
+            exit 1
+        fi
     fi
 
     installtl_do_path_adjustments
@@ -190,7 +214,7 @@ installtl_do_postinst_stuff () {
 ### TeXLive::TLUtils
 
 tlutils_info () {
-    printf '%s\n' "texlive: $*"
+    printf "texlive${__formatsOf:+($__formatsOf-fmt)}: %s\n" "$*"
 }
 
 tlutils_create_fmtutil () {
diff --git a/pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix b/pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix
index c5a55cf0f9c96..1356fc325047e 100644
--- a/pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix
+++ b/pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix
@@ -62,7 +62,7 @@ let
     # TeX Live packages should not be installed directly into the user profile
     outputsToInstall = [ ];
     longDescription = ''
-      This package cannot be installed directly. Please use `texlive.withPackages`.
+      This package cannot be installed or used directly. Please use `texlive.withPackages (ps: [ ps.${lib.strings.escapeNixIdentifier pname} ])`.
     '';
     # discourage nix-env from matching this package
     priority = 10;
@@ -152,7 +152,7 @@ let
 
   # fake derivation for resolving dependencies in the absence of a "tex" containers
   fakeTeX = passthru
-    // { inherit meta; tlOutputName = "tex"; }
+    // { inherit meta; tlOutputName = "tex"; inherit build; }
     // outputDrvs;
 
   containers = rec {
@@ -214,22 +214,31 @@ let
           ln -s {"$texdoc"/doc,"$out"/share}/info
         '') [ "out" ] // outputDrvs;
   };
-in
-if outputs == [ ] then removeAttrs fakeTeX [ "outputSpecified" ] else
-runCommand name
-  {
-    __structuredAttrs = true;
-    inherit meta outputDrvs outputs;
-    passthru = removeAttrs passthru [ "outputSpecified" ];
-
-    # force output name in case "out" is missing
-    nativeBuildInputs = lib.optional (! hasBinfiles)
-      (writeShellScript "force-output.sh" ''
+
+  # multioutput derivation to be exported under texlivePackages
+  # to make Hydra build all containers
+  build = runCommand name
+    {
+      __structuredAttrs = true;
+      inherit meta outputDrvs;
+      outputs = if outputs != [ ] then outputs else [ "out" ];
+      passthru = removeAttrs passthru [ "outputSpecified" ] // { inherit build; };
+
+      # force output name in case "out" is missing
+      preHook = lib.optionalString (!hasBinfiles && outputs != [ ]) ''
         export out="''${${builtins.head outputs}-}"
-      '');
-  }
-  ''
-    for outputName in ''${!outputs[@]} ; do
-      ln -s "''${outputDrvs[$outputName]}" "''${outputs[$outputName]}"
-    done
-  '' // outputDrvs
+      '';
+    }
+    # each output is just a symlink to the corresponding container
+    # if the container is missing (that is, outputs == [ ]), create a file, to prevent passing the package to .withPackages
+    ''
+      for outputName in ''${!outputs[@]} ; do
+        if [[ -n ''${outputDrvs[$outputName]} ]] ; then
+          ln -s "''${outputDrvs[$outputName]}" "''${outputs[$outputName]}"
+        else
+          touch "''${outputs[$outputName]}"
+        fi
+      done
+    '';
+in
+if outputs == [ ] then removeAttrs fakeTeX [ "outputSpecified" ] else build // outputDrvs
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix
index e84f89cdd6af3..acb4a20314ed6 100644
--- a/pkgs/tools/typesetting/tex/texlive/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive/default.nix
@@ -57,11 +57,11 @@ let
   # need to be used instead. Ideally, for the release branches of NixOS we
   # should be switching to the tlnet-final versions
   # (https://tug.org/historic/).
-  mirrors = with version; lib.optionals final  [
+  mirrors = lib.optionals version.final  [
     # tlnet-final snapshot; used when texlive.tlpdb is frozen
     # the TeX Live yearly freeze typically happens in mid-March
-    "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${toString texliveYear}/tlnet-final"
-    "ftp://tug.org/texlive/historic/${toString texliveYear}/tlnet-final"
+    "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${toString version.texliveYear}/tlnet-final"
+    "ftp://tug.org/texlive/historic/${toString version.texliveYear}/tlnet-final"
   ] ++ [
     # CTAN mirrors
     "https://mirror.ctan.org/systems/texlive/tlnet"
@@ -71,7 +71,7 @@ let
     # please note that this server is not meant for large scale deployment
     # 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/${version.year}/${version.month}/${version.day}/tlnet"
   ];
 
   tlpdbxz = fetchurl {
@@ -148,9 +148,9 @@ let
   # now a legacy wrapper around buildTeXEnv
   combine = import ./combine-wrapper.nix { inherit buildTeXEnv lib toTLPkgList toTLPkgSets; };
 
-  assertions = with lib;
-    assertMsg (tlpdbVersion.year == version.texliveYear) "TeX Live year in texlive does not match tlpdb.nix, refusing to evaluate" &&
-    assertMsg (tlpdbVersion.frozen == version.final) "TeX Live final status in texlive does not match tlpdb.nix, refusing to evaluate";
+  assertions =
+    lib.assertMsg (tlpdbVersion.year == version.texliveYear) "TeX Live year in texlive does not match tlpdb.nix, refusing to evaluate" &&
+    lib.assertMsg (tlpdbVersion.frozen == version.final) "TeX Live final status in texlive does not match tlpdb.nix, refusing to evaluate";
 
   # Pre-defined evironment packages for TeX Live schemes,
   # to make nix-env usage more comfortable and build selected on Hydra.
@@ -191,7 +191,7 @@ let
       (pname:
         (buildTeXEnv {
           __extraName = "combined" + lib.removePrefix "scheme" pname;
-          __extraVersion = with version; if final then "-final" else ".${year}${month}${day}";
+          __extraVersion = if version.final then "-final" else ".${version.year}${version.month}${version.day}";
           requiredTeXPackages = ps: [ ps.${pname} ];
           # to maintain full backward compatibility, enable texlive.combine behavior
           __combine = true;
diff --git a/pkgs/tools/typesetting/tex/texpresso/default.nix b/pkgs/tools/typesetting/tex/texpresso/default.nix
index e2e244ceda69d..8653782da71c4 100644
--- a/pkgs/tools/typesetting/tex/texpresso/default.nix
+++ b/pkgs/tools/typesetting/tex/texpresso/default.nix
@@ -17,7 +17,13 @@
 
 stdenv.mkDerivation rec {
   pname = "texpresso";
-  version = "0-unstable-2024-04-18";
+  version = "0-unstable-2024-07-02";
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace-fail "CC=gcc" "CC=${stdenv.cc.targetPrefix}cc" \
+      --replace-fail "LDCC=g++" "LDCC=${stdenv.cc.targetPrefix}c++"
+  '';
 
   nativeBuildInputs = [
     makeWrapper
@@ -35,12 +41,16 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "let-def";
     repo = "texpresso";
-    rev = "62b2b5913420d92bb2863d9c92ac2072f7aaa5f9";
-    hash = "sha256-kVGRuFVkJvQfl1bEjBU0pyx+SB+k5yI9C6XFiKZRpLQ=";
+    rev = "0e14b1df6269b07c2c985f001e32b48673495a8b";
+    hash = "sha256-av1yadR2giJUxFQuHSXFgTbCNsmccrzKOmLVnAGJt6c=";
   };
 
   buildFlags = [ "texpresso" ];
 
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
+    "-Wno-error=implicit-function-declaration"
+  ]);
+
   installPhase = ''
     runHook preInstall
     install -Dm0755 -t "$out/bin/" "build/${pname}"
@@ -67,8 +77,9 @@ stdenv.mkDerivation rec {
 
   meta = {
     inherit (src.meta) homepage;
-    description = "Live rendering and error reporting for LaTeX.";
+    description = "Live rendering and error reporting for LaTeX";
     maintainers = with lib.maintainers; [ nickhu ];
     license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/tools/typesetting/tex/texpresso/tectonic.nix b/pkgs/tools/typesetting/tex/texpresso/tectonic.nix
index 070594349ad71..34df5c5ed1f40 100644
--- a/pkgs/tools/typesetting/tex/texpresso/tectonic.nix
+++ b/pkgs/tools/typesetting/tex/texpresso/tectonic.nix
@@ -6,11 +6,11 @@ tectonic-unwrapped.override (old: {
       src = fetchFromGitHub {
         owner = "let-def";
         repo = "tectonic";
-        rev = "7729f1360a7e1e8b8a9f8a6a23f96b5f7cc023d0";
-        hash = "sha256-OyVkA2EuejxpQvA6pOuFaZh8ghZZ3HaV9q5DZ/2sIrY=";
+        rev = "5b844105c06e0b16e40b1254359f8c28e8956280";
+        hash = "sha256-RPsXmp+5MF9h+H3wdL1O1hXSRZWjWTY8lXq/dWZIM1g=";
         fetchSubmodules = true;
       };
-      cargoHash = "sha256-62sxvPIiY3len1wsl7QelK3u4ekftIjcTqoIGZMYb5A=";
+      cargoHash = "sha256-g4iBo8r+QUOcFJ3CI2+HOi4VHxU7jKnIWlJcKx/6r5E=";
       # binary has a different name, bundled tests won't work
       doCheck = false;
       meta.mainProgram = "texpresso-tonic";
diff --git a/pkgs/tools/typesetting/tikzit/default.nix b/pkgs/tools/typesetting/tikzit/default.nix
index 44c2fed0508ac..e6402deaa96b1 100644
--- a/pkgs/tools/typesetting/tikzit/default.nix
+++ b/pkgs/tools/typesetting/tikzit/default.nix
@@ -18,7 +18,7 @@ mkDerivation {
   enableParallelBuilding = false;
 
   meta = with lib; {
-    description = "A graphical tool for rapidly creating graphs and diagrams using PGF/TikZ";
+    description = "Graphical tool for rapidly creating graphs and diagrams using PGF/TikZ";
     longDescription = ''
       TikZiT is a simple GUI editor for graphs and string diagrams.
       Its native file format is a subset of PGF/TikZ, which means TikZiT files
diff --git a/pkgs/tools/typesetting/xmlto/default.nix b/pkgs/tools/typesetting/xmlto/default.nix
index 09597be8540df..a29ef2aaed69d 100644
--- a/pkgs/tools/typesetting/xmlto/default.nix
+++ b/pkgs/tools/typesetting/xmlto/default.nix
@@ -1,44 +1,68 @@
-{ fetchurl, fetchpatch, lib, stdenv, libxml2, libxslt
-, docbook_xml_dtd_45, docbook_xsl, flex, w3m
-, bash, getopt, makeWrapper }:
+{
+  autoreconfHook,
+  bash,
+  coreutils,
+  docbook_xml_dtd_45,
+  docbook_xsl,
+  docbook-xsl-ns,
+  fetchgit,
+  findutils,
+  flex,
+  getopt,
+  gnugrep,
+  gnused,
+  lib,
+  libxml2,
+  libxslt,
+  makeWrapper,
+  stdenv,
+  testers,
+  w3m,
+}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "xmlto";
-  version = "0.0.28";
-  src = fetchurl {
-    url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.bz2";
-    sha256 = "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i";
-  };
+  version = "0.0.29";
 
-  # Note: These patches modify `xmlif/xmlif.l`, which requires `flex` to be rerun.
-  patches = [
-    # Fixes implicit `int` on `main`, which is an error with clang 16.
-    (fetchpatch {
-      url = "https://pagure.io/xmlto/c/8e34f087bf410bcc5fe445933d6ad9bae54f24b5.patch";
-      hash = "sha256-z5riDBZBVuFeBcjI++dAl3nTIgOPau4Gag0MJbYt+cc=";
-    })
-    # Fixes implicit `int` on `ifsense`, which is also an error with clang 16.
-    (fetchpatch {
-      url = "https://pagure.io/xmlto/c/1375e2df75530cd198bd16ac3de38e2b0d126276.patch";
-      hash = "sha256-fM6ZdTigrcC9cbXiKu6oa5Hs71mrREockB1wRlw6nDk=";
-    })
-  ];
+  src = fetchgit {
+    url = "https://pagure.io/xmlto.git";
+    rev = finalAttrs.version;
+    hash = "sha256-wttag8J1t9cBPBHNY7me2H0IPOzS8IjfCLIHNWq67Do=";
+  };
 
   postPatch = ''
     patchShebangs xmlif/test/run-test
 
     substituteInPlace "xmlto.in" \
-      --replace "/bin/bash" "${bash}/bin/bash"
-    substituteInPlace "xmlto.in" \
-      --replace "/usr/bin/locale" "$(type -P locale)"
-    substituteInPlace "xmlto.in" \
-      --replace "mktemp" "$(type -P mktemp)"
+      --replace-fail "@XMLTO_BASH_PATH@" "${bash}/bin/bash" \
+      --replace-fail "@FIND@" "${findutils}/bin/find" \
+      --replace-fail "@GETOPT@" "${getopt}/bin/getopt" \
+      --replace-fail "@GREP@" "${gnugrep}/bin/grep" \
+      --replace-fail "@MKTEMP@" "$(type -P mktemp)" \
+      --replace-fail "@SED@" "${gnused}/bin/sed" \
+      --replace-fail "@TAIL@" "${coreutils}/bin/tail"
+
+    for f in format/docbook/* xmlto.in; do
+      substituteInPlace $f \
+        --replace-fail "http://docbook.sourceforge.net/release/xsl/current" "${docbook-xsl-ns}/xml/xsl/docbook"
+    done
   '';
 
   # `libxml2' provides `xmllint', needed at build-time and run-time.
   # `libxslt' provides `xsltproc', used by `xmlto' at run-time.
-  nativeBuildInputs = [ makeWrapper flex getopt ];
-  buildInputs = [ libxml2 libxslt docbook_xml_dtd_45 docbook_xsl ];
+  nativeBuildInputs = [
+    autoreconfHook
+    makeWrapper
+    flex
+    getopt
+  ];
+
+  buildInputs = [
+    docbook_xml_dtd_45
+    docbook_xsl
+    libxml2
+    libxslt
+  ];
 
   postInstall = ''
     # `w3m' is needed for HTML to text conversions.
@@ -46,18 +70,24 @@ stdenv.mkDerivation rec {
        --prefix PATH : "${lib.makeBinPath [ libxslt libxml2 getopt w3m ]}"
   '';
 
+  passthru.tests.version = testers.testVersion {
+    command = "${lib.getExe finalAttrs.finalPackage} --version";
+    package = finalAttrs.finalPackage;
+  };
+
   meta = {
+    changelog = "https://pagure.io/xmlto/blob/master/f/ChangeLog";
     description = "Front-end to an XSL toolchain";
-
+    homepage = "https://pagure.io/xmlto/";
+    license = lib.licenses.gpl2Plus;
     longDescription = ''
       xmlto is a front-end to an XSL toolchain.  It chooses an
       appropriate stylesheet for the conversion you want and applies
       it using an external XSL-T processor.  It also performs any
       necessary post-processing.
     '';
-
-    license = lib.licenses.gpl2Plus;
-    homepage = "https://pagure.io/xmlto/";
+    mainProgram = "xmlto";
+    maintainers = [ ];
     platforms = lib.platforms.unix;
   };
-}
+})