Merge pull request #131401 from SuperSandro2000/fail2ban
fail2ban: cleanup
This commit is contained in:
commit
6df6003859
1 changed files with 16 additions and 15 deletions
|
@ -1,15 +1,14 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, python3 }:
|
{ lib, stdenv, fetchFromGitHub, python3 }:
|
||||||
|
|
||||||
let version = "0.11.2"; in
|
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "fail2ban";
|
pname = "fail2ban";
|
||||||
inherit version;
|
version = "0.11.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "fail2ban";
|
owner = "fail2ban";
|
||||||
repo = "fail2ban";
|
repo = "fail2ban";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "q4U9iWCa1zg8sA+6pPNejt6v/41WGIKN5wITJCrCqQE=";
|
sha256 = "q4U9iWCa1zg8sA+6pPNejt6v/41WGIKN5wITJCrCqQE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,18 +41,20 @@ python3.pkgs.buildPythonApplication {
|
||||||
${stdenv.shell} ./fail2ban-2to3
|
${stdenv.shell} ./fail2ban-2to3
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = let
|
postInstall =
|
||||||
sitePackages = "$out/${python3.sitePackages}";
|
let
|
||||||
in ''
|
sitePackages = "$out/${python3.sitePackages}";
|
||||||
# see https://github.com/NixOS/nixpkgs/issues/4968
|
in
|
||||||
rm -rf ${sitePackages}/etc ${sitePackages}/usr ${sitePackages}/var;
|
''
|
||||||
'';
|
# see https://github.com/NixOS/nixpkgs/issues/4968
|
||||||
|
rm -r ${sitePackages}/etc ${sitePackages}/usr
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.fail2ban.org/";
|
homepage = "https://www.fail2ban.org/";
|
||||||
description = "A program that scans log files for repeated failing login attempts and bans IP addresses";
|
description = "A program that scans log files for repeated failing login attempts and bans IP addresses";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ eelco lovek323 fpletz ];
|
maintainers = with maintainers; [ eelco lovek323 fpletz ];
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue