From e098c562b306d2fcb3121e289d03e320930829bd Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 14 May 2022 16:40:33 +0100 Subject: [PATCH] gpg-mdp: pull patch pending upstream inclusion for -fno-common toolchains Without the change build fails as: ld: editor.o:(.bss+0x8): multiple definition of `cfg_character_set'; config.o:(.bss+0x20): first defined here ld: editor.o:(.bss+0x10): multiple definition of `cfg_character_count'; config.o:(.data+0x10): first defined here --- pkgs/applications/misc/gpg-mdp/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gpg-mdp/default.nix b/pkgs/applications/misc/gpg-mdp/default.nix index 48c7c7724eb..08ab2a5b7d9 100644 --- a/pkgs/applications/misc/gpg-mdp/default.nix +++ b/pkgs/applications/misc/gpg-mdp/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, lib, stdenv, ncurses, gnupg }: +{ fetchurl, fetchpatch, lib, stdenv, ncurses, gnupg }: let version = "0.7.4"; in stdenv.mkDerivation { @@ -14,6 +14,15 @@ in stdenv.mkDerivation { url = "https://tamentis.com/projects/mdp/files/mdp-${version}.tar.gz"; sha256 = "04mdnx4ccpxf9m2myy9nvpl9ma4jgzmv9bkrzv2b9affzss3r34g"; }; + patches = [ + # Pull fix pending upstream inclusion for -fno-common toolchain support: + # https://github.com/tamentis/mdp/pull/9 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/tamentis/mdp/commit/95c77de3beb96dc7c76ff36d3f3dfb18411d7c54.patch"; + sha256 = "1j6yvjzkx31b758yav4arhlm5ig7phl8mgx4fcwj7lm2pfvzwcsz"; + }) + ]; buildInputs = [ ncurses ]; prePatch = '' substituteInPlace ./configure \