From 417ae79c26cdaa4978077797d63b69f1c4ced245 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Jun 2022 20:48:56 +0100 Subject: trinity: pull upstream fix for -fno-common toolchains Without the change build fail on upstream gcc-10 as: ld: trinity.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here --- pkgs/os-specific/linux/trinity/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/trinity/default.nix b/pkgs/os-specific/linux/trinity/default.nix index 9bfe0e942ee..09a2d8bf638 100644 --- a/pkgs/os-specific/linux/trinity/default.nix +++ b/pkgs/os-specific/linux/trinity/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { pname = "trinity"; @@ -11,6 +11,15 @@ stdenv.mkDerivation rec { sha256 = "0z1a7x727xacam74jccd223k303sllgwpq30lnq9b6xxy8b659bv"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/kernelslacker/trinity/commit/e53e25cc8dd5bdb5f7d9b4247de9e9921eec81d8.patch"; + sha256 = "0dbhyc98x11cmac6rj692zymnfqfqcbawlrkg1lhgfagzjxxwshg"; + }) + ]; + postPatch = '' patchShebangs configure patchShebangs scripts -- cgit 1.4.1