From fd2826353b2e3b0b0e33249ee34ec241f1e9a2a8 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 14 May 2022 13:23:58 +0100 Subject: [PATCH] fwknop: pull patch pending upstream inclusion for -fno-common support Without the change build on -fno-common tollchains fails as: ld: fwknop-log_msg.o:/build/source/client/log_msg.h:41: multiple definition of `log_level_t'; fwknop-fwknop.o:/build/source/client/log_msg.h:41: first defined here --- pkgs/tools/security/fwknop/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/fwknop/default.nix b/pkgs/tools/security/fwknop/default.nix index b56ba93dc7bc..5625ab47058d 100644 --- a/pkgs/tools/security/fwknop/default.nix +++ b/pkgs/tools/security/fwknop/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook , libpcap, texinfo , iptables , gnupgSupport ? true, gnupg, gpgme # Increases dependencies! @@ -17,6 +17,16 @@ stdenv.mkDerivation rec { sha256 = "05kvqhmxj9p2y835w75f3jvhr38bb96cd58mvfd7xil9dhmhn9ra"; }; + patches = [ + # Pull patch pending upstream inclusion for -fno-common tollchains: + # https://github.com/mrash/fwknop/pull/319 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/mrash/fwknop/commit/a8214fd58bc46d23b64b3a55db023c7f5a5ea6af.patch"; + sha256 = "0cp1350q66n455hpd3rdydb9anx66bcirza5gyyyy5232zgg58bi"; + }) + ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ libpcap texinfo ] ++ lib.optionals gnupgSupport [ gnupg gpgme.dev ]