1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 pyopenssl, 7 pytestCheckHook, 8 pythonOlder, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "aiosasl"; 14 version = "0.5.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "horazont"; 21 repo = "aiosasl"; 22 tag = "v${version}"; 23 hash = "sha256-JIuNPb/l4QURMQc905H2iNGCfMz+zM/QJhDQOR8LPdc="; 24 }; 25 26 patches = [ 27 (fetchpatch { 28 name = "python311-compat.patch"; 29 url = "https://github.com/horazont/aiosasl/commit/44c48d36b416bd635d970dba2607a31b2167ea1b.patch"; 30 hash = "sha256-u6PJKV54dU2MA9hXa/9hJ3eLVds1DuLHGbt8y/OakWs="; 31 }) 32 ]; 33 34 postPatch = '' 35 # https://github.com/horazont/aiosasl/issues/28 36 substituteInPlace tests/test_aiosasl.py \ 37 --replace-fail "assertRaisesRegexp" "assertRaisesRegex" 38 ''; 39 40 build-system = [ setuptools ]; 41 42 nativeCheckInputs = [ 43 pyopenssl 44 pytestCheckHook 45 ]; 46 47 pythonImportsCheck = [ "aiosasl" ]; 48 49 meta = { 50 description = "Asyncio SASL library"; 51 homepage = "https://github.com/horazont/aiosasl"; 52 license = lib.licenses.lgpl3Plus; 53 maintainers = with lib.maintainers; [ dotlambda ]; 54 }; 55}