From efda700bc26762b26938131f22de70aa2938a0b4 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 14:29:12 +0300 Subject: [PATCH 01/12] texpresso: set strictDeps and split to buildInputs Should have been done correctly in the init commit of it (#299168). --- pkgs/by-name/te/texpresso/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/te/texpresso/package.nix b/pkgs/by-name/te/texpresso/package.nix index ddda76c43b6d..6ee830876cdd 100644 --- a/pkgs/by-name/te/texpresso/package.nix +++ b/pkgs/by-name/te/texpresso/package.nix @@ -33,8 +33,13 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "LDCC=g++" "LDCC=${stdenv.cc.targetPrefix}c++" ''; + strictDeps = true; + nativeBuildInputs = [ makeWrapper + ]; + + buildInputs = [ mupdf SDL2 re2c From a8eca96edb54dde86c6a23116a505773b86b1bc6 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 14:31:18 +0300 Subject: [PATCH 02/12] texpresso: small semantic changes --- pkgs/by-name/te/texpresso/package.nix | 48 ++++++++++++++++----------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/pkgs/by-name/te/texpresso/package.nix b/pkgs/by-name/te/texpresso/package.nix index 6ee830876cdd..5427a98ddd5b 100644 --- a/pkgs/by-name/te/texpresso/package.nix +++ b/pkgs/by-name/te/texpresso/package.nix @@ -1,19 +1,25 @@ { - stdenv, lib, + stdenv, fetchFromGitHub, + + # nativeBuildInputs makeWrapper, - writeScript, - mupdf, - SDL2, - re2c, + + # buildInputs freetype, - jbig2dec, - harfbuzz, - openjpeg, gumbo, + harfbuzz, + jbig2dec, libjpeg, + mupdf, + openjpeg, + re2c, + SDL2, + + # passthru callPackage, + writeScript, }: stdenv.mkDerivation (finalAttrs: { @@ -40,28 +46,30 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - mupdf - SDL2 - re2c freetype - jbig2dec - harfbuzz - openjpeg gumbo + harfbuzz + jbig2dec libjpeg + mupdf + openjpeg + re2c + SDL2 ]; - buildFlags = [ "texpresso" ]; + buildFlags = [ + "texpresso" + ]; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.hostPlatform.isDarwin [ + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-function-declaration" - ] - ); + ]; + }; installPhase = '' runHook preInstall - install -Dm0755 -t "$out/bin/" "build/texpresso" + install -D -t "$out/bin/" "build/texpresso" runHook postInstall ''; From 75ec8afea2e1e8d0317c36f540c2d555851a41a7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 12 Apr 2026 12:22:48 +0300 Subject: [PATCH 03/12] texpresso: 0.1 -> 0.1-unstable-2026-04-02 The main improvement of this update, is this: https://github.com/let-def/texpresso/pull/102 Which allows us to avoid maintaining yet another derivation. --- pkgs/by-name/te/texpresso/package.nix | 50 ++++++++++---------------- pkgs/by-name/te/texpresso/tectonic.nix | 42 ---------------------- 2 files changed, 19 insertions(+), 73 deletions(-) delete mode 100644 pkgs/by-name/te/texpresso/tectonic.nix diff --git a/pkgs/by-name/te/texpresso/package.nix b/pkgs/by-name/te/texpresso/package.nix index 5427a98ddd5b..894dc5ea9b51 100644 --- a/pkgs/by-name/te/texpresso/package.nix +++ b/pkgs/by-name/te/texpresso/package.nix @@ -5,60 +5,65 @@ # nativeBuildInputs makeWrapper, + pkg-config, + writeShellScriptBin, # buildInputs + fontconfig, freetype, - gumbo, harfbuzz, + icu, jbig2dec, libjpeg, mupdf, - openjpeg, - re2c, SDL2, - - # passthru - callPackage, - writeScript, }: stdenv.mkDerivation (finalAttrs: { pname = "texpresso"; - version = "0.1"; + version = "0.1-unstable-2026-04-02"; src = fetchFromGitHub { owner = "let-def"; repo = "texpresso"; - tag = "v${finalAttrs.version}"; - hash = "sha256-d+wNQIysn3hdTQnHN9MJbFOIhJQ0ml6PoeuwsryntTI="; + rev = "96f008c94ece067fac8e896d0ab1808c948a4dd3"; + hash = "sha256-ew7n3Sp4uYLv5jijRW2rRM9s63TQCeFgKXmmBXdYjx4="; }; postPatch = '' substituteInPlace Makefile \ --replace-fail "CC=gcc" "CC=${stdenv.cc.targetPrefix}cc" \ --replace-fail "LDCC=g++" "LDCC=${stdenv.cc.targetPrefix}c++" + substituteInPlace src/engine/Makefile \ + --replace-fail "_CC?=gcc" "_CC?=${stdenv.cc.targetPrefix}cc" \ + --replace-fail "_LD?=g++" "_LD?=${stdenv.cc.targetPrefix}c++" \ + --replace-fail "_CXX?=g++" "_CXX?=${stdenv.cc.targetPrefix}c++" ''; strictDeps = true; nativeBuildInputs = [ makeWrapper + pkg-config + # Especially for Darwin builds, we pretend we are Linux to avoid upstream's + # makefiles from using brew. + (writeShellScriptBin "uname" "echo Linux") ]; buildInputs = [ + fontconfig freetype - gumbo harfbuzz + icu jbig2dec libjpeg mupdf - openjpeg - re2c SDL2 ]; buildFlags = [ "texpresso" + "texpresso-xetex" ]; env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { @@ -70,27 +75,10 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall install -D -t "$out/bin/" "build/texpresso" + install -D -t "$out/bin/" "build/texpresso-xetex" runHook postInstall ''; - # needs to have texpresso-tonic on its path - postInstall = '' - wrapProgram $out/bin/texpresso \ - --prefix PATH : ${lib.makeBinPath [ finalAttrs.finalPackage.passthru.tectonic ]} - ''; - - passthru = { - tectonic = callPackage ./tectonic.nix { }; - updateScript = writeScript "update-texpresso" '' - #!/usr/bin/env nix-shell - #!nix-shell -i bash -p curl jq nix-update - - tectonic_version="$(curl -s "https://api.github.com/repos/let-def/texpresso/contents/tectonic" | jq -r '.sha')" - nix-update texpresso - nix-update --version=branch=$tectonic_version texpresso.tectonic - ''; - }; - meta = { inherit (finalAttrs.src.meta) homepage; description = "Live rendering and error reporting for LaTeX"; diff --git a/pkgs/by-name/te/texpresso/tectonic.nix b/pkgs/by-name/te/texpresso/tectonic.nix deleted file mode 100644 index fe04d15191d7..000000000000 --- a/pkgs/by-name/te/texpresso/tectonic.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - tectonic-unwrapped, - fetchFromGitHub, - rustPlatform, -}: - -tectonic-unwrapped.overrideAttrs ( - finalAttrs: prevAttrs: { - pname = "texpresso-tonic"; - version = "0.15.0-unstable-2024-04-19"; - src = fetchFromGitHub { - owner = "let-def"; - repo = "tectonic"; - rev = "b38cb3b2529bba947d520ac29fbb7873409bd270"; - hash = "sha256-ap7fEPHsASAphIQkjcvk1CC7egTdxaUh7IpSS5os4W8="; - fetchSubmodules = true; - }; - - cargoHash = "sha256-mqhbIv5r/5EDRDfP2BymXv9se2NCKxzRGqNqwqbD9A0="; - # rebuild cargoDeps by hand because `.overrideAttrs cargoHash` - # does not reconstruct cargoDeps (a known limitation): - cargoDeps = rustPlatform.fetchCargoVendor { - inherit (finalAttrs) src; - name = "${finalAttrs.pname}-${finalAttrs.version}"; - hash = finalAttrs.cargoHash; - patches = finalAttrs.cargoPatches; - }; - # binary has a different name, bundled tests won't work - doCheck = false; - postInstall = '' - ${prevAttrs.postInstall or ""} - - # Remove the broken `nextonic` symlink - # It points to `tectonic`, which doesn't exist because the exe is - # renamed to texpresso-tonic - rm $out/bin/nextonic - ''; - meta = prevAttrs.meta // { - mainProgram = "texpresso-tonic"; - }; - } -) From a7fb6b70b317289a50cce780fe35e918d6bbdb83 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 14:49:01 +0300 Subject: [PATCH 04/12] tectonic-unwrapped: install desktop files with 644 permissions --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index ab4800a389fd..bce4aa2d1d38 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -79,8 +79,8 @@ buildRustPackage (finalAttrs: { + lib.optionalString clangStdenv.hostPlatform.isLinux '' substituteInPlace dist/appimage/tectonic.desktop \ --replace Exec=tectonic Exec=$out/bin/tectonic - install -D dist/appimage/tectonic.desktop -t $out/share/applications/ - install -D dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/ + install -Dm644 dist/appimage/tectonic.desktop -t $out/share/applications/ + install -Dm644 dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/ ''; doCheck = true; From 33d317fc74424eacddfebc7905ed483ce74f1833 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 14:49:28 +0300 Subject: [PATCH 05/12] tectonic-unwrapped: substitute Exec line with --replace-fail --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index bce4aa2d1d38..7b8be90f7423 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -78,7 +78,7 @@ buildRustPackage (finalAttrs: { '' + lib.optionalString clangStdenv.hostPlatform.isLinux '' substituteInPlace dist/appimage/tectonic.desktop \ - --replace Exec=tectonic Exec=$out/bin/tectonic + --replace-fail Exec=tectonic Exec=$out/bin/tectonic install -Dm644 dist/appimage/tectonic.desktop -t $out/share/applications/ install -Dm644 dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/ ''; From a4bcccc9c1dd2e1c684c830ebdb3182e177175f9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 13 Apr 2026 11:02:02 +0300 Subject: [PATCH 06/12] tectonic-unwrapped: reorder expression arguments --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index 7b8be90f7423..325744cdf537 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -10,13 +10,17 @@ lib, clangStdenv, fetchFromGitHub, + fetchpatch2, rustPlatform, + + # nativeBuildInputs + pkg-config, + + # buildInputs fontconfig, harfbuzzFull, openssl, - pkg-config, icu, - fetchpatch2, }: let @@ -61,7 +65,9 @@ buildRustPackage (finalAttrs: { cargoHash = "sha256-OMa89riyopKMQf9E9Fr7Qs4hFfEfjnDFzaSWFtkYUXE="; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + ]; buildFeatures = [ "external-harfbuzz" ]; From a3d70cceac7181a6314b04a330448b2455652a3b Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 13 Apr 2026 11:04:28 +0300 Subject: [PATCH 07/12] tectonic-unwrapped: share passthru.tests with wrapped tectonic --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index 325744cdf537..649ded603f4d 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -21,6 +21,9 @@ harfbuzzFull, openssl, icu, + + # passthru.tests + tectonic, }: let @@ -91,6 +94,10 @@ buildRustPackage (finalAttrs: { doCheck = true; + passthru = { + inherit (tectonic.passthru) tests; + }; + meta = { description = "Modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive"; homepage = "https://tectonic-typesetting.github.io/"; From 9ee6e26cb952a007e2506530e243a86062af1e36 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 14:59:05 +0300 Subject: [PATCH 08/12] tectonic-unwrapped: enable strictDeps and __structuredAttrs --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index 649ded603f4d..0e30d7c02156 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -98,6 +98,9 @@ buildRustPackage (finalAttrs: { inherit (tectonic.passthru) tests; }; + strictDeps = true; + __structuredAttrs = true; + meta = { description = "Modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive"; homepage = "https://tectonic-typesetting.github.io/"; From 664ea371bb2a86d6153094e3988c793dba919f97 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 12 Apr 2026 09:42:33 +0300 Subject: [PATCH 09/12] tectonic{-unwrapped,}: 0.15.0 -> 0.16.8 Diff: https://github.com/tectonic-typesetting/tectonic/compare/tectonic@0.15.0...tectonic@0.16.8 Changelog: https://github.com/tectonic-typesetting/tectonic/blob/tectonic@0.16.8/CHANGELOG.md Other note: The hard-coded bundle URL is now written into the unwrapped derivation, and the comment of it was expanded and should explain why this was done. Due to this change, overriding tectonic to use a different default bundle will require either wrapping only `tectonic` to use a different `--bundle` command line argument, or rebuilding the unwrapped derivation with a different `env.TECTONIC_BUNDLE_LOCKED`. --- .../by-name/te/tectonic-unwrapped/package.nix | 79 ++++++++++--------- ...0.15-fix-dangerous_implicit_autorefs.patch | 13 --- pkgs/by-name/te/tectonic/package.nix | 9 --- pkgs/by-name/te/tectonic/tests.nix | 2 +- 4 files changed, 44 insertions(+), 59 deletions(-) delete mode 100644 pkgs/by-name/te/tectonic-unwrapped/tectonic-0.15-fix-dangerous_implicit_autorefs.patch diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index 0e30d7c02156..9fff6c7debb9 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -8,9 +8,8 @@ { lib, - clangStdenv, + stdenv, fetchFromGitHub, - fetchpatch2, rustPlatform, # nativeBuildInputs @@ -26,47 +25,18 @@ tectonic, }: -let - - buildRustPackage = rustPlatform.buildRustPackage.override { - # use clang to work around build failure with GCC 14 - # see: https://github.com/tectonic-typesetting/tectonic/issues/1263 - stdenv = clangStdenv; - }; - -in - -buildRustPackage (finalAttrs: { +rustPlatform.buildRustPackage (finalAttrs: { pname = "tectonic"; - version = "0.15.0"; + version = "0.16.8"; src = fetchFromGitHub { owner = "tectonic-typesetting"; repo = "tectonic"; rev = "tectonic@${finalAttrs.version}"; - sha256 = "sha256-dZnUu0g86WJIIvwMgdmwb6oYqItxoYrGQTFNX7I61Bs="; + sha256 = "sha256-drQ8hCe5vJHewUTFJTfVOotFvuUX19dHQLu2nVIWKbQ="; }; - patches = [ - (fetchpatch2 { - # https://github.com/tectonic-typesetting/tectonic/pull/1155 - name = "1155-fix-endless-reruns-when-generating-bbl"; - url = "https://github.com/tectonic-typesetting/tectonic/commit/fbb145cd079497b8c88197276f92cb89685b4d54.patch"; - hash = "sha256-6FW5MFkOWnqzYX8Eg5DfmLaEhVWKYVZwodE4SGXHKV0="; - }) - ./tectonic-0.15-fix-dangerous_implicit_autorefs.patch - ]; - - cargoPatches = [ - (fetchpatch2 { - # cherry-picked from https://github.com/tectonic-typesetting/tectonic/pull/1202 - name = "1202-fix-build-with-rust-1_80-and-icu-75"; - url = "https://github.com/tectonic-typesetting/tectonic/compare/19654bf152d602995da970f6164713953cffc2e6...6b49ca8db40aaca29cb375ce75add3e575558375.patch?full_index=1"; - hash = "sha256-CgQBCFvfYKKXELnR9fMDqmdq97n514CzGJ7EBGpghJc="; - }) - ]; - - cargoHash = "sha256-OMa89riyopKMQf9E9Fr7Qs4hFfEfjnDFzaSWFtkYUXE="; + cargoHash = "sha256-Hh2w8c/K+AXdX4p620fqVUttQPY33eVIAf0/VIFhHiY="; nativeBuildInputs = [ pkg-config @@ -81,17 +51,54 @@ buildRustPackage (finalAttrs: { openssl ]; + # By default, tectonic looks up the latest bundle by opening this URL: + # + # https://relay.fullyjustified.net/default_bundle_v${FORMAT_VERSION}.tar + # + # Where FORMAT_VERSION is defined here: + # + # https://github.com/tectonic-typesetting/tectonic/blob/master/crates/engine_xetex/xetex/xetex_bindings.h + # + # When we updated the package, this URL redirects to the following: + # + # https://data1.fullyjustified.net/tlextras-2022.0r0.tar + # + # The environment variable set below, sets the URL that will be used during + # runtime by default. We chose to hard-code a URL to a specific version of + # the web bundle, so that upstream won't update the `default_bundle` without + # us noticing, and break compatibility with our biber-for-tectonic package. + # + # This is in principle the right thing to do, ever since the 0.16.0 release. + # As opposed to what we had with version 0.15.0, we choose to not hard-code a + # --web-bundle (or --bundle) argument in the wrapper of the + # `tectonic-wrapped` package, as it is not compatible with nextonic, and + # `tectonic -X` commands of versions 0.16.0+ -- These commands require the + # `--bundle` argument to appear after the subcommand. + # + # Lastly, we might in the future need to update the bundle URL below if + # upstream will upload a new bundle. However, upstream hasn't updated a new + # bundle for a long time, see: + # + # https://github.com/tectonic-typesetting/tectonic/issues/1269 + # + env.TECTONIC_BUNDLE_LOCKED = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar"; + postInstall = '' # Makes it possible to automatically use the V2 CLI API ln -s $out/bin/tectonic $out/bin/nextonic '' - + lib.optionalString clangStdenv.hostPlatform.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace dist/appimage/tectonic.desktop \ --replace-fail Exec=tectonic Exec=$out/bin/tectonic install -Dm644 dist/appimage/tectonic.desktop -t $out/share/applications/ install -Dm644 dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/ ''; + checkFlags = [ + # Test fails due to tectonic bundle missing and can't be downloaded in the + # sandbox + "--skip=tests::no_segfault_after_failed_compilation" + ]; doCheck = true; passthru = { diff --git a/pkgs/by-name/te/tectonic-unwrapped/tectonic-0.15-fix-dangerous_implicit_autorefs.patch b/pkgs/by-name/te/tectonic-unwrapped/tectonic-0.15-fix-dangerous_implicit_autorefs.patch deleted file mode 100644 index 883c38486a71..000000000000 --- a/pkgs/by-name/te/tectonic-unwrapped/tectonic-0.15-fix-dangerous_implicit_autorefs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/crates/engine_bibtex/src/xbuf.rs b/crates/engine_bibtex/src/xbuf.rs -index 8f3949e7..c216eb4d 100644 ---- a/crates/engine_bibtex/src/xbuf.rs -+++ b/crates/engine_bibtex/src/xbuf.rs -@@ -52,7 +52,7 @@ pub unsafe fn xrealloc_zeroed( - old: *mut [T], - new_len: usize, - ) -> Option<&'static mut [T]> { -- let old_len = (*old).len(); -+ let old_len = (&(*old)).len(); - let new_size = new_len * mem::size_of::(); - // SAFETY: realloc can be called with any size, even 0, that will just deallocate and return null - let ptr = unsafe { xrealloc(old.cast(), new_size) }.cast::(); diff --git a/pkgs/by-name/te/tectonic/package.nix b/pkgs/by-name/te/tectonic/package.nix index 0f36036bfcfb..947bed1eeacf 100644 --- a/pkgs/by-name/te/tectonic/package.nix +++ b/pkgs/by-name/te/tectonic/package.nix @@ -1,7 +1,6 @@ { lib, symlinkJoin, - tectonic, tectonic-unwrapped, biber-for-tectonic, makeBinaryWrapper, @@ -19,13 +18,6 @@ symlinkJoin { unwrapped = tectonic-unwrapped; biber = biber-for-tectonic; tests = callPackage ./tests.nix { }; - - # The version locked tectonic web bundle, redirected from: - # https://relay.fullyjustified.net/default_bundle_v33.tar - # To check for updates, see: - # https://github.com/tectonic-typesetting/tectonic/blob/master/crates/bundles/src/lib.rs - # ... and look up `get_fallback_bundle_url`. - bundleUrl = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar"; }; # Replace the unwrapped tectonic with the one wrapping it with biber @@ -48,7 +40,6 @@ symlinkJoin { + '' makeWrapper ${lib.getBin tectonic-unwrapped}/bin/tectonic $out/bin/tectonic \ --prefix PATH : "${lib.getBin biber-for-tectonic}/bin" \ - --add-flags "--web-bundle ${tectonic.passthru.bundleUrl}" \ --inherit-argv0 ## make sure binary name e.g. `nextonic` is passed along ln -s $out/bin/tectonic $out/bin/nextonic ''; diff --git a/pkgs/by-name/te/tectonic/tests.nix b/pkgs/by-name/te/tectonic/tests.nix index 04c91a1235c3..cb95d18de6ff 100644 --- a/pkgs/by-name/te/tectonic/tests.nix +++ b/pkgs/by-name/te/tectonic/tests.nix @@ -94,7 +94,7 @@ lib.mapAttrs networkRequiringTestPkg { workspace = '' tectonic -X new - cat Tectonic.toml | grep "${tectonic.bundleUrl}" + cat Tectonic.toml | grep "${tectonic.unwrapped.TECTONIC_BUNDLE_LOCKED}" ''; /** From 8dfa4f62c4a520a6c052de52164b1adc35b8c949 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 14 Apr 2026 12:53:45 +0300 Subject: [PATCH 10/12] tectonic-unwrapped: fix a substantial upstream bug --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index 9fff6c7debb9..ffb55ef972de 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -10,6 +10,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch2, rustPlatform, # nativeBuildInputs @@ -36,6 +37,15 @@ rustPlatform.buildRustPackage (finalAttrs: { sha256 = "sha256-drQ8hCe5vJHewUTFJTfVOotFvuUX19dHQLu2nVIWKbQ="; }; + patches = [ + # Fixes a substantial MacOS arm64 bug, see: + # https://github.com/tectonic-typesetting/tectonic/pull/1346 + (fetchpatch2 { + url = "https://github.com/tectonic-typesetting/tectonic/commit/5d95f47720e6518daa7164b097f207b772d565ac.patch"; + hash = "sha256-GQPRwP9vljDIzs1uEBlnCdAGcvG/mLpw0WtM5wqobWg="; + }) + ]; + cargoHash = "sha256-Hh2w8c/K+AXdX4p620fqVUttQPY33eVIAf0/VIFhHiY="; nativeBuildInputs = [ From 818bce69d9c751a06a2f9ea45814fd6a3f737fb8 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 17 Apr 2026 15:16:38 +0300 Subject: [PATCH 11/12] tectonic-unwrapped: 0.16.8 -> 0.16.9 Diff: https://github.com/tectonic-typesetting/tectonic/compare/tectonic@0.16.8...tectonic@0.16.9 Changelog: https://github.com/tectonic-typesetting/tectonic/blob/tectonic@0.16.9/CHANGELOG.md --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index ffb55ef972de..a325bfbd6f79 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -10,7 +10,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch2, rustPlatform, # nativeBuildInputs @@ -28,25 +27,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "tectonic"; - version = "0.16.8"; + version = "0.16.9"; src = fetchFromGitHub { owner = "tectonic-typesetting"; repo = "tectonic"; rev = "tectonic@${finalAttrs.version}"; - sha256 = "sha256-drQ8hCe5vJHewUTFJTfVOotFvuUX19dHQLu2nVIWKbQ="; + sha256 = "sha256-5yphhmrrfgFwQ952eWpToyGfIJVJfV6y5w0BgznSOe0="; }; - patches = [ - # Fixes a substantial MacOS arm64 bug, see: - # https://github.com/tectonic-typesetting/tectonic/pull/1346 - (fetchpatch2 { - url = "https://github.com/tectonic-typesetting/tectonic/commit/5d95f47720e6518daa7164b097f207b772d565ac.patch"; - hash = "sha256-GQPRwP9vljDIzs1uEBlnCdAGcvG/mLpw0WtM5wqobWg="; - }) - ]; - - cargoHash = "sha256-Hh2w8c/K+AXdX4p620fqVUttQPY33eVIAf0/VIFhHiY="; + cargoHash = "sha256-22Hy51zCzY2DRytcYHgwkI9+e/g52o1jy4eosvEm3KY="; nativeBuildInputs = [ pkg-config From a88b601ea35f3509ef1508e727be2892b42674de Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 17 Apr 2026 15:44:37 +0300 Subject: [PATCH 12/12] tectonic-unwrapped: skip failing test on Darwin --- pkgs/by-name/te/tectonic-unwrapped/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/te/tectonic-unwrapped/package.nix b/pkgs/by-name/te/tectonic-unwrapped/package.nix index a325bfbd6f79..27270b54c86b 100644 --- a/pkgs/by-name/te/tectonic-unwrapped/package.nix +++ b/pkgs/by-name/te/tectonic-unwrapped/package.nix @@ -98,6 +98,11 @@ rustPlatform.buildRustPackage (finalAttrs: { # Test fails due to tectonic bundle missing and can't be downloaded in the # sandbox "--skip=tests::no_segfault_after_failed_compilation" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Test Panics only on Darwin, see: + # https://github.com/tectonic-typesetting/tectonic/issues/1352 + "--skip=v2_watch_succeeds" ]; doCheck = true;