From 705f5cf21e727052455bc2eee831e718404059a9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 21 May 2022 09:47:17 +0100 Subject: [PATCH] email: pull patch pending upstream inclusion for -fno-common toolchain supprot Without the change build fails on upstream gcc-10 as: ld: utils.o:include/email.h:81: multiple definition of `Mopts'; email.o:include/email.h:81: first defined here ld: utils.o:include/email.h:64: multiple definition of `table'; email.o:include/email.h:64: first defined here ld: utils.o:include/email.h:65: multiple definition of `conf_file'; email.o:include/email.h:65: first defined here --- pkgs/tools/networking/email/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/email/default.nix b/pkgs/tools/networking/email/default.nix index 2a6faa9c173..8848068d0de 100644 --- a/pkgs/tools/networking/email/default.nix +++ b/pkgs/tools/networking/email/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, openssl }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, openssl }: let eMailSrc = fetchFromGitHub { @@ -24,6 +24,16 @@ stdenv.mkDerivation { version = "unstable-2016-01-31"; src = eMailSrc; + patches = [ + # Pul patch pending upstream inclusion for -fno-common toolchain support: + # https://github.com/deanproxy/eMail/pull/61 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/deanproxy/eMail/commit/c3c1e52132832be0e51daa6e0037d5bb79a17751.patch"; + sha256 = "17ndrb65g0v4y521333h4244419s8nncm0yx2jwv12sf0dl6gy8i"; + }) + ]; + buildInputs = [ openssl ]; unpackPhase = ''