at 24.11-pre 1.9 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cryptography, 5 defusedxml, 6 fetchFromGitHub, 7 fetchPypi, 8 paste, 9 poetry-core, 10 pyasn1, 11 pymongo, 12 pyopenssl, 13 pytestCheckHook, 14 python-dateutil, 15 pythonOlder, 16 pythonRelaxDepsHook, 17 pytz, 18 repoze-who, 19 requests, 20 responses, 21 setuptools, 22 substituteAll, 23 xmlschema, 24 xmlsec, 25 zope-interface, 26}: 27 28buildPythonPackage rec { 29 pname = "pysaml2"; 30 version = "7.5.0"; 31 format = "pyproject"; 32 33 disabled = pythonOlder "3.9"; 34 35 src = fetchFromGitHub { 36 owner = "IdentityPython"; 37 repo = "pysaml2"; 38 rev = "refs/tags/v${version}"; 39 hash = "sha256-M/tdKGu6K38TeBZc8/dt376bHhPB0svHB3iis/se0DY="; 40 }; 41 42 patches = [ 43 (substituteAll { 44 src = ./hardcode-xmlsec1-path.patch; 45 inherit xmlsec; 46 }) 47 ]; 48 49 postPatch = '' 50 # Fix failing tests on systems with 32bit time_t 51 sed -i 's/2999\(-.*T\)/2029\1/g' tests/*.xml 52 ''; 53 54 pythonRelaxDeps = [ "xmlschema" ]; 55 56 nativeBuildInputs = [ 57 poetry-core 58 pythonRelaxDepsHook 59 ]; 60 61 propagatedBuildInputs = [ 62 cryptography 63 defusedxml 64 pyopenssl 65 python-dateutil 66 pytz 67 requests 68 setuptools 69 xmlschema 70 ]; 71 72 passthru.optional-dependencies = { 73 s2repoze = [ 74 paste 75 repoze-who 76 zope-interface 77 ]; 78 }; 79 80 nativeCheckInputs = [ 81 pyasn1 82 pymongo 83 pytestCheckHook 84 responses 85 ]; 86 87 disabledTests = [ 88 # Disabled tests try to access the network 89 "test_load_extern_incommon" 90 "test_load_remote_encoding" 91 "test_load_external" 92 "test_conf_syslog" 93 ]; 94 95 pythonImportsCheck = [ "saml2" ]; 96 97 meta = with lib; { 98 description = "Python implementation of SAML Version 2 Standard"; 99 homepage = "https://github.com/IdentityPython/pysaml2"; 100 changelog = "https://github.com/IdentityPython/pysaml2/blob/v${version}/CHANGELOG.md"; 101 license = licenses.asl20; 102 maintainers = with maintainers; [ ]; 103 }; 104}