14 buildPythonPackage rec {
19 disabled = pythonOlder "3.7";
21 src = fetchFromGitLab {
22 domain = "foss.heptapod.net";
23 owner = "python-libs";
25 rev = "refs/tags/${version}";
26 hash = "sha256-Mx2Xg/KAEfvfep2B/gWATTiAPJc+f22MTcsEdRpt3n8=";
29 build-system = [ setuptools ];
31 dependencies = [ setuptools ];
33 optional-dependencies = {
34 argon2 = [ argon2-cffi ];
36 totp = [ cryptography ];
39 # Fix for https://foss.heptapod.net/python-libs/passlib/-/issues/190
41 substituteInPlace passlib/handlers/bcrypt.py \
42 --replace-fail "version = _bcrypt.__about__.__version__" \
43 "version = getattr(getattr(_bcrypt, '__about__', _bcrypt), '__version__', '<unknown>')"
51 ++ optional-dependencies.argon2
52 ++ optional-dependencies.bcrypt
53 ++ optional-dependencies.totp;
55 pythonImportsCheck = [ "passlib" ];
60 "test_encrypt_cost_timing"
61 # These tests fail because they don't expect support for algorithms provided through libxcrypt
62 "test_82_crypt_support"
66 # hashing algorithms we don't support anymore
67 "--deselect=passlib/tests/test_handlers.py::des_crypt_os_crypt_test::test_82_crypt_support"
68 "--deselect=passlib/tests/test_handlers.py::md5_crypt_os_crypt_test::test_82_crypt_support"
69 "--deselect=passlib/tests/test_handlers.py::sha256_crypt_os_crypt_test::test_82_crypt_support"
73 changelog = "https://foss.heptapod.net/python-libs/passlib/-/blob/${version}/docs/history/${lib.versions.majorMinor version}.rst";
74 description = "Password hashing library for Python";
75 homepage = "https://foss.heptapod.net/python-libs/passlib";
76 license = lib.licenses.bsdOriginal;
77 maintainers = with lib.maintainers; [ dotlambda ];