diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index 06449d8ff1c5..87619c6afe18 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -8,7 +8,7 @@ , makeWrapper, shortenPerlShebang, useFixedHashes, asymptote , biber-ms , tlpdb -}: +}@args: # Useful resource covering build options: # http://tug.org/texlive/doc/tlbuild.html @@ -420,7 +420,28 @@ pygmentex = python3Packages.buildPythonApplication rec { }; }; -inherit asymptote; +asymptote = args.asymptote.overrideAttrs (finalAttrs: prevAttrs: { + version = texlive.pkgs.asymptote.version; + + # keep local src and patches even if duplicated in the top level asymptote + # so that top level updates do not break texlive + src = fetchurl { + url = "mirror://sourceforge/asymptote/${finalAttrs.version}/asymptote-${finalAttrs.version}.src.tgz"; + hash = "sha256-DecadD+m7pORuH3Sdcs/5M3vUbN6rhSkFoNN0Soq9bs="; + }; + + texContainer = texlive.pkgs.asymptote.tex; + texdocContainer = texlive.pkgs.asymptote.texdoc; + + patches = [ + (fetchpatch { + # partial fix for macOS XDR/V3D support (LDFLAGS change seems like an unrelated bugfix) + name = "restore-LDFLAGS-dont-look-for-tirpc-under-MacOS.patch"; + url = "https://github.com/vectorgraphics/asymptote/commit/7e17096b22d18d133d1bc5916b6e32c0cb24ad10.patch"; + hash = "sha256-olCFzqfZwWOAjqlB5lDPXYRHU9i3VQNgoR0cO5TmW98="; + }) + ]; +}); inherit biber; inherit biber-ms;