<commit_before>{ lib, buildPythonPackage, fetchPypi, isPy3k, substituteAll, aiodns, pyasn1, pyasn1-modules, aiohttp, gnupg, nose }:

buildPythonPackage rec {
  pname = "slixmpp";
  version = "1.7.0";

  disabled = !isPy3k;

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-fy7sRKS7ih4JmjOW/noL8qJ1xWVpQLbBbObHnMwT3Bc=";
  };

  patches = [
    (substituteAll {
      src = ./hardcode-gnupg-path.patch;
      inherit gnupg;
    })
  ];

  propagatedBuildInputs = [ aiodns pyasn1 pyasn1-modules aiohttp ];

  checkInputs = [ nose ];

  checkPhase = ''
    nosetests --where=tests --exclude=live -i slixtest.py
  '';

  meta = {
    description = "Elegant Python library for XMPP";
    license = lib.licenses.mit;
    homepage = "https://dev.louiz.org/projects/slixmpp";
  };
}
<commit_msg>python3Packages.slixmpp: switch to pytestCheckHook<commit_after>{ lib
, buildPythonPackage
, aiodns
, aiohttp
, fetchPypi
, gnupg
, isPy3k
, pyasn1
, pyasn1-modules
, pytestCheckHook
, substituteAll
}:

buildPythonPackage rec {
  pname = "slixmpp";
  version = "1.7.0";

  disabled = !isPy3k;

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-fy7sRKS7ih4JmjOW/noL8qJ1xWVpQLbBbObHnMwT3Bc=";
  };

  patches = [
    (substituteAll {
      src = ./hardcode-gnupg-path.patch;
      inherit gnupg;
    })
  ];

  propagatedBuildInputs = [
    aiodns
    aiohttp
    pyasn1
    pyasn1-modules
  ];

  checkInputs = [ pytestCheckHook ];

  # Exclude live tests
  disabledTestFiles = [ "tests/live_test.py" ];

  pythonImportsCheck = [ "slixmpp" ];

  meta = with lib; {
    description = "Elegant Python library for XMPP";
    homepage = "https://slixmpp.readthedocs.io/";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}

{'fraction_non_alphanumeric': 0.12365894974590627, 'fraction_numerical': 0.024280067758328628, 'mean_word_length': 3.15962441314554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1557369', 'n_tokens_mistral': 743, 'n_tokens_neox': 704, 'n_words': 124}