{ argon2-cffi, bcrypt, buildPythonPackage, cryptography, fetchFromGitHub, hatchling, lib, pytest-archon, pytest-xdist, pytestCheckHook, typing-extensions, }: buildPythonPackage (finalAttrs: { pname = "libpass"; version = "1.9.4"; pyproject = true; src = fetchFromGitHub { owner = "notypecheck"; repo = "passlib"; tag = finalAttrs.version; hash = "sha256-d+iBTJrUzzLXAnbIJ56NHg8dZrv7Qd3ikNWOhXBiUzM="; }; build-system = [ hatchling ]; optional-dependencies = { argon2 = [ argon2-cffi ]; bcrypt = [ bcrypt ]; totp = [ cryptography ]; }; nativeCheckInputs = [ pytest-archon pytest-xdist pytestCheckHook ] ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies; pythonImportsCheck = [ "passlib" ]; disabledTestPaths = [ # https://github.com/notypecheck/passlib/issues/18 "tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_70_hashes" "tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_77_fuzz_input" "tests/test_handlers_django.py::django_bcrypt_test::test_77_fuzz_input" "tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_secret_w_truncate_size" "tests/test_handlers_django.py::django_bcrypt_test::test_secret_w_truncate_size" ]; disabledTests = [ # timing sensitive "test_dummy_verify" "test_encrypt_cost_timing" ]; meta = { changelog = "https://github.com/notypecheck/passlib/blob/${finalAttrs.src.tag}/CHANGELOG.md"; description = "Comprehensive password hashing framework supporting over 30 schemes"; homepage = "https://github.com/notypecheck/passlib"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ dotlambda ]; }; })