From 58e2a1848067d3482d4c88c03440c5ecdf3d1e95 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 2 Jul 2022 20:48:31 +0100 Subject: [PATCH] texlive.bin.xdvi: pull upstream darwin fix for -fno-common toolchains Without the change build fails on upstream llvm-11 as: duplicate symbol '_info' in: libxdvi.a(font-open.o) libxdvi.a(print-log.o) --- pkgs/tools/typesetting/tex/texlive/bin.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index 4b278c12a3f8..c99face8d7d8 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl +{ lib, stdenv, fetchurl, fetchpatch , texlive , zlib, libiconv, libpng, libX11 , freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext @@ -25,6 +25,15 @@ let ]; sha256 = "0jsq1p66l46k2qq0gbqmx25flj2nprsz4wrd1ybn286p11kdkvvs"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains. + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/TeX-Live/texlive-source/commit/7748582aeda70ffa02105f6e3e2fc2476e76aac6.patch"; + sha256 = "1y59cwa41kbg0i071g488jhi9qg0h8l7hqd69brhx2yj95za8c40"; + excludes = [ "texk/xdvik/ChangeLog" ]; + }) + ]; prePatch = '' for i in texk/kpathsea/mktex*; do @@ -406,7 +415,7 @@ xdvi = stdenv.mkDerivation { pname = "texlive-xdvi.bin"; inherit version; - inherit (common) src; + inherit (common) src patches; nativeBuildInputs = [ pkg-config ]; buildInputs = [ core/*kpathsea*/ freetype ghostscript ]