anchor.diff: -{ stdenv, fetchFromGitHub, python, pythonPackages, gamin }:
  +{ stdenv, fetchFromGitHub, fetchpatch, python3, gamin }:
   
   let version = "0.10.4"; in
   
  -pythonPackages.buildPythonApplication {
  +python3.pkgs.buildPythonApplication {
     pname = "fail2ban";
     inherit version;
   
  
positive.code:     sha256 = "07ik6rm856q0ic2r7vbg6j3hsdcdgkv44hh5ck0c2y21fqwrck3l";
    };
  
    propagatedBuildInputs = [ gamin ]
      ++ (stdenv.lib.optional stdenv.isLinux pythonPackages.systemd);
  
    preConfigure = ''
      for i in config/action.d/sendmail*.conf; do
  
negative.code:     substituteInPlace setup.py --replace /usr/share/doc/ share/doc/
  
      # see https://github.com/NixOS/nixpkgs/issues/4968
      ${python3.interpreter} setup.py install_data --install-dir=$out --root=$out
    '';
  
    postInstall = let
      sitePackages = "$out/${python3.sitePackages}";
    in ''
      # see https://github.com/NixOS/nixpkgs/issues/4968
      rm -rf ${sitePackages}/etc ${sitePackages}/usr ${sitePackages}/var;
  