diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2022-01-18 13:35:43 -0800 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-01-23 01:09:39 +0100 |
commit | 5c6ac69554c00cd50a43204df69859a87a067cf1 (patch) | |
tree | b5d033f400dd93356198bff079470f3cba5bd635 /pkgs/tools/security | |
parent | 46bf3585b5b387e232dc1763446ec1305859376d (diff) | |
download | nixpkgs-5c6ac69554c00cd50a43204df69859a87a067cf1.tar nixpkgs-5c6ac69554c00cd50a43204df69859a87a067cf1.tar.gz nixpkgs-5c6ac69554c00cd50a43204df69859a87a067cf1.tar.bz2 nixpkgs-5c6ac69554c00cd50a43204df69859a87a067cf1.tar.lz nixpkgs-5c6ac69554c00cd50a43204df69859a87a067cf1.tar.xz nixpkgs-5c6ac69554c00cd50a43204df69859a87a067cf1.tar.zst nixpkgs-5c6ac69554c00cd50a43204df69859a87a067cf1.zip |
fail2ban: fix post setuptools>=58
https://github.com/fail2ban/fail2ban/issues/3098
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r-- | pkgs/tools/security/fail2ban/default.nix | 19 |
1 files changed, 17 insertions, 2 deletions
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 \ |