python313Packages.slixmpp: fix build and modernize

+36 -10
+36 -10
pkgs/development/python-modules/slixmpp/default.nix
··· 3 buildPythonPackage, 4 aiodns, 5 aiohttp, 6 fetchPypi, 7 gnupg, 8 pyasn1, 9 pyasn1-modules, 10 pytestCheckHook, 11 replaceVars, 12 pythonOlder, 13 }: 14 15 buildPythonPackage rec { 16 pname = "slixmpp"; 17 version = "1.10.0"; 18 - format = "setuptools"; 19 20 disabled = pythonOlder "3.9"; 21 ··· 24 hash = "sha256-RrxdAVB8tChcglXOXHF8C19o5U38HxcSiDmY1tciV4o="; 25 }; 26 27 - propagatedBuildInputs = [ 28 aiodns 29 - aiohttp 30 pyasn1 31 pyasn1-modules 32 ]; 33 34 - nativeCheckInputs = [ pytestCheckHook ]; 35 36 - patches = [ 37 - (replaceVars ./hardcode-gnupg-path.patch { 38 - inherit gnupg; 39 - }) 40 - ]; 41 42 disabledTestPaths = [ 43 # Exclude live tests 44 "tests/live_test.py" 45 - "tests/test_xep_0454.py" 46 ]; 47 48 pythonImportsCheck = [ "slixmpp" ];
··· 3 buildPythonPackage, 4 aiodns, 5 aiohttp, 6 + cryptography, 7 + defusedxml, 8 + emoji, 9 fetchPypi, 10 gnupg, 11 pyasn1, 12 pyasn1-modules, 13 pytestCheckHook, 14 replaceVars, 15 + rustPlatform, 16 pythonOlder, 17 }: 18 19 buildPythonPackage rec { 20 pname = "slixmpp"; 21 version = "1.10.0"; 22 + pyproject = true; 23 24 disabled = pythonOlder "3.9"; 25 ··· 28 hash = "sha256-RrxdAVB8tChcglXOXHF8C19o5U38HxcSiDmY1tciV4o="; 29 }; 30 31 + patches = [ 32 + (replaceVars ./hardcode-gnupg-path.patch { 33 + inherit gnupg; 34 + }) 35 + ]; 36 + 37 + build-system = with rustPlatform; [ 38 + cargoSetupHook 39 + maturinBuildHook 40 + ]; 41 + 42 + cargoDeps = rustPlatform.fetchCargoVendor { 43 + inherit pname src; 44 + hash = "sha256-CeuClBYEG2YCm5lnxFs5RhjIgYEOe76rzHpauLZeQR0="; 45 + }; 46 + 47 + dependencies = [ 48 aiodns 49 pyasn1 50 pyasn1-modules 51 ]; 52 53 + optional-dependencies = { 54 + xep-0363 = [ aiohttp ]; 55 + xep-0444-compliance = [ emoji ]; 56 + xep-0464 = [ cryptography ]; 57 + safer-xml-parserig = [ defusedxml ]; 58 + }; 59 60 + nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies); 61 + 62 + preCheck = '' 63 + # don't test against pure python version in the source tree 64 + rm -rf slixmpp 65 + ''; 66 67 disabledTestPaths = [ 68 + # Exclude integration tests 69 + "itests/" 70 # Exclude live tests 71 "tests/live_test.py" 72 ]; 73 74 pythonImportsCheck = [ "slixmpp" ];