From a3cdf3186fd7e2a8dde319cea656ddf0958421bf Mon Sep 17 00:00:00 2001 From: apfelkuchen6 <73002165+apfelkuchen6@users.noreply.github.com> Date: Thu, 29 Jun 2023 22:12:05 +0200 Subject: [PATCH] texlive.bin.core-big: fix luajittex on aarch64-linux (#240577) --- pkgs/test/texlive/default.nix | 5 +---- pkgs/tools/typesetting/tex/texlive/bin.nix | 10 ++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index cea3e621ebf7..ae0e913a7600 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -222,10 +222,7 @@ "convertgls2bib" "ctan-o-mat" "ctanify" "ctanupload" "dtxgen" "ebong" "epspdftk" "exceltex" "gsx" "htcontext" "installfont-tl" "kanji-fontmap-creator" "ketcindy" "latex-git-log" "latex2nemeth" "ltxfileinfo" "match_parens" "pdfannotextractor" "purifyeps" "pythontex" "svn-multi" "texexec" "texosquery" "texosquery-jre5" - "texosquery-jre8" "texplate" "tlcockpit" "tlmgr" "tlshell" "ulqda" "xhlatex" ] - # texluajitc is seemingly outdated and broken on native Linux aarch64 - # some info at https://github.com/NixOS/nixpkgs/pull/239804#issuecomment-1609832232 - ++ lib.optional (with stdenv; isAarch64 && isLinux) "texluajitc"; + "texosquery-jre8" "texplate" "tlcockpit" "tlmgr" "tlshell" "ulqda" "xhlatex" ]; # (1) binaries requiring -v shortVersion = [ "devnag" "diadia" "pmxchords" "ptex2pdf" "simpdftex" "ttf2afm" ]; # (1) binaries requiring --help or -h diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index c66a776cccc3..c62b1165bba5 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -214,6 +214,16 @@ core-big = stdenv.mkDerivation { #TODO: upmendex excludes = [ "build.sh" ]; stripLen = 1; }) + # Fixes texluajitc crashes on aarch64, backport of the upstream fix + # https://github.com/LuaJIT/LuaJIT/commit/e9af1abec542e6f9851ff2368e7f196b6382a44c + # to the version vendored by texlive (2.1.0-beta3) + (fetchpatch { + name = "luajit-fix-aarch64-linux.patch"; + url = "https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/LuaJIT/patches/e9af1abec542e6f9851ff2368e7f196b6382a44c.patch"; + hash = "sha256-ysSZmfpfCFMukfHmIqwofAZux1e2kEq/37lfqp7HoWo="; + stripLen = 1; + extraPrefix = "libs/luajit/LuaJIT-src/"; + }) ]; hardeningDisable = [ "format" ];