1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 freezegun, 7 isodate, 8 lxml, 9 pytestCheckHook, 10 pythonOlder, 11 poetry-core, 12 xmlsec, 13}: 14 15buildPythonPackage rec { 16 pname = "python3-saml"; 17 version = "1.16.0"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "onelogin"; 24 repo = "python3-saml"; 25 tag = "v${version}"; 26 hash = "sha256-KyDGmqhg/c29FaXPKK8rWKSBP6BOCpKKpOujCavXUcc="; 27 }; 28 29 patches = [ 30 # Fix build system, https://github.com/SAML-Toolkits/python3-saml/pull/341 31 (fetchpatch { 32 name = "switch-to-poetry-core.patch"; 33 url = "https://github.com/SAML-Toolkits/python3-saml/commit/231a7e19543138fdd7424c01435dfe3f82bbe9ce.patch"; 34 hash = "sha256-MvX1LXhf3LJUy3O7L0/ySyVY4KDGc/GKJud4pOkwVIk="; 35 }) 36 ]; 37 38 nativeBuildInputs = [ poetry-core ]; 39 40 propagatedBuildInputs = [ 41 isodate 42 lxml 43 xmlsec 44 ]; 45 46 nativeCheckInputs = [ 47 freezegun 48 pytestCheckHook 49 ]; 50 51 pythonImportsCheck = [ "onelogin.saml2" ]; 52 53 disabledTests = [ 54 # Tests require network access or additions files 55 "OneLogin_Saml2_Metadata_Test" 56 "OneLogin_Saml2_Response_Test" 57 "OneLogin_Saml2_Utils_Test" 58 "OneLogin_Saml2_Settings_Test" 59 "OneLogin_Saml2_Auth_Test" 60 "OneLogin_Saml2_Authn_Request_Test" 61 "OneLogin_Saml2_IdPMetadataParser_Test" 62 "OneLogin_Saml2_Logout_Request_Test" 63 ]; 64 65 meta = with lib; { 66 description = "OneLogin's SAML Python Toolkit"; 67 homepage = "https://github.com/onelogin/python3-saml"; 68 changelog = "https://github.com/SAML-Toolkits/python3-saml/blob/v${version}/changelog.md"; 69 license = licenses.mit; 70 maintainers = with maintainers; [ zhaofengli ]; 71 }; 72}