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