<commit_before>{ lib
, buildPythonPackage
, fetchFromGitHub
, pam
}:

buildPythonPackage rec {
  pname = "python-pam";
  version = "1.8.4";

  src = fetchFromGitHub {
    owner = "FirefighterBlu3";
    repo = pname;
    rev = "v${version}";
    sha256 = "0gp7vzd332j7jwndcnz7kc9j283d6lyv32bndd1nqv9ghzv69sxp";
  };

  buildInputs = [
    pam
  ];

  postPatch = ''
    sed "s|find_library(\"pam\")|\"${pam}/lib/libpam.so\"|g" -i pam.py
  '';

  meta = with lib; {
    description = "Python pam module supporting py3 (and py2)";
    homepage = "https://github.com/FirefighterBlu3/python-pam";
    license = licenses.mit;
    maintainers = with maintainers; [ abbradar mkg20001 ];
  };<commit_msg>python3Packages.python-pam: 1.8.4 -> 2.0.2<commit_after>{ lib
, buildPythonPackage
, fetchFromGitHub
, pam
, six
, toml
}:

buildPythonPackage rec {
  pname = "python-pam";
  version = "2.0.2";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "FirefighterBlu3";
    repo = pname;
    rev = "refs/tags/v${version}";
    sha256 = "sha256-MR9LYXtkbltAmn7yoyyKZn4yMHyh3rj/i/pA8nJy2xU=";
  };

  postPatch = ''
    substituteInPlace src/pam/__internals.py \
      --replace 'find_library("pam")' '"${pam}/lib/libpam.so"' \
      --replace 'find_library("pam_misc")' '"${pam}/lib/libpam_misc.so"'
  '';

  buildInputs = [
    pam
  ];

  propagatedBuildInputs = [
    six
    toml
  ];

  pythonImportsCheck = [ "pam" ];

  meta = with lib; {
    description = "Python pam module";
    homepage = "https://github.com/FirefighterBlu3/python-pam";
    license = licenses.mit;
    maintainers = with maintainers; [ abbradar mkg20001 ];
  };
{'fraction_non_alphanumeric': 0.15670731707317073, 'fraction_numerical': 0.03780487804878049, 'mean_word_length': 3.186224489795918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1559263', 'n_tokens_mistral': 703, 'n_tokens_neox': 657, 'n_words': 107}