at 22.05-pre 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, cryptography 4, defusedxml 5, fetchFromGitHub 6, importlib-resources 7, mock 8, pyasn1 9, pymongo 10, pyopenssl 11, pytestCheckHook 12, python-dateutil 13, pythonOlder 14, pytz 15, requests 16, responses 17, six 18, substituteAll 19, xmlschema 20, xmlsec 21}: 22 23buildPythonPackage rec { 24 pname = "pysaml2"; 25 version = "7.1.0"; 26 format = "setuptools"; 27 28 disabled = pythonOlder "3.6"; 29 30 src = fetchFromGitHub { 31 owner = "IdentityPython"; 32 repo = pname; 33 rev = "v${version}"; 34 sha256 = "sha256-3Yl6j6KAlw7QQYnwU7+naY6D97IqX766zguekKAuic8="; 35 }; 36 37 propagatedBuildInputs = [ 38 cryptography 39 python-dateutil 40 defusedxml 41 pyopenssl 42 pytz 43 requests 44 six 45 xmlschema 46 ] ++ lib.optionals (pythonOlder "3.9") [ 47 importlib-resources 48 ]; 49 50 checkInputs = [ 51 mock 52 pyasn1 53 pymongo 54 pytestCheckHook 55 responses 56 ]; 57 58 patches = [ 59 (substituteAll { 60 src = ./hardcode-xmlsec1-path.patch; 61 inherit xmlsec; 62 }) 63 ]; 64 65 postPatch = '' 66 # fix failing tests on systems with 32bit time_t 67 sed -i 's/2999\(-.*T\)/2029\1/g' tests/*.xml 68 ''; 69 70 disabledTests = [ 71 # Disabled tests try to access the network 72 "test_load_extern_incommon" 73 "test_load_remote_encoding" 74 "test_load_external" 75 "test_conf_syslog" 76 ]; 77 78 pythonImportsCheck = [ 79 "saml2" 80 ]; 81 82 meta = with lib; { 83 description = "Python implementation of SAML Version 2 Standard"; 84 homepage = "https://github.com/IdentityPython/pysaml2"; 85 license = licenses.asl20; 86 maintainers = with maintainers; [ ]; 87 }; 88}