From 5c6ac69554c00cd50a43204df69859a87a067cf1 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 18 Jan 2022 13:35:43 -0800 Subject: fail2ban: fix post setuptools>=58 https://github.com/fail2ban/fail2ban/issues/3098 --- pkgs/tools/security/fail2ban/default.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'pkgs/tools/security') diff --git a/pkgs/tools/security/fail2ban/default.nix b/pkgs/tools/security/fail2ban/default.nix index 92848def1d1..d6f9dd35c35 100644 --- a/pkgs/tools/security/fail2ban/default.nix +++ b/pkgs/tools/security/fail2ban/default.nix @@ -1,5 +1,7 @@ -{ lib, stdenv, fetchFromGitHub, python3 }: - +{ lib, stdenv, fetchFromGitHub +, python3 +, fetchpatch +}: python3.pkgs.buildPythonApplication rec { pname = "fail2ban"; @@ -17,7 +19,20 @@ python3.pkgs.buildPythonApplication rec { systemd ]; + patches = [ + (fetchpatch { + url = "https://github.com/fail2ban/fail2ban/commit/5ac303df8a171f748330d4c645ccbf1c2c7f3497.patch"; + sha256 = "sha256-aozQJHwPcJTe/D/PLQzBk1YH3OAP6Qm7wO7cai5CVYI= +"; + }) + ]; + preConfigure = '' + # workaround for setuptools 58+ + # https://github.com/fail2ban/fail2ban/issues/3098 + patchShebangs fail2ban-2to3 + ./fail2ban-2to3 + for i in config/action.d/sendmail*.conf; do substituteInPlace $i \ --replace /usr/sbin/sendmail sendmail \ -- cgit 1.4.1