at 23.05-pre 1.1 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, argon2-cffi 6, bcrypt 7, cryptography 8, pytestCheckHook 9}: 10 11buildPythonPackage rec { 12 pname = "passlib"; 13 version = "1.7.4"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04"; 18 }; 19 20 passthru.optional-dependencies = { 21 argon2 = [ argon2-cffi ]; 22 bcrypt = [ bcrypt ]; 23 totp = [ cryptography ]; 24 }; 25 26 checkInputs = [ 27 pytestCheckHook 28 ] ++ passthru.optional-dependencies.argon2 29 ++ passthru.optional-dependencies.bcrypt 30 ++ passthru.optional-dependencies.totp; 31 32 disabledTests = [ 33 # timming sensitive 34 "test_dummy_verify" 35 ] 36 # These tests fail because they don't expect support for algorithms provided through libxcrypt 37 ++ lib.optionals stdenv.isDarwin [ 38 "test_82_crypt_support" 39 ]; 40 41 meta = with lib; { 42 description = "A password hashing library for Python"; 43 homepage = "https://foss.heptapod.net/python-libs/passlib"; 44 license = licenses.bsdOriginal; 45 maintainers = with maintainers; [ ]; 46 }; 47}