Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python3-saml / default.nix
blob7a5d8bccaa31689159cb5f80b3dca7dfb6743275
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , freezegun
6 , isodate
7 , lxml
8 , pythonOlder
9 , xmlsec
12 buildPythonPackage rec {
13   pname = "python3-saml";
14   version = "1.15.0";
15   format = "setuptools";
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "onelogin";
21     repo = "python3-saml";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-xPPR2z3h8RpoAROpKpu9ZoDxGq5Stm9wQVt4Stj/6fg=";
24   };
26   patches = [
27     # skip tests with expired test data
28     # upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
29     (fetchpatch {
30       name = "test-expired.patch";
31       url = "https://github.com/SAML-Toolkits/python3-saml/commit/bd65578e5a21494c89320094c61c1c77250bea33.diff";
32       hash = "sha256-9Trew6R5JDjtc0NRGoklqMVDEI4IEqFOdK3ezyBU6gI=";
33     })
34     (fetchpatch {
35       name = "test-expired.patch";
36       url = "https://github.com/SAML-Toolkits/python3-saml/commit/ea3a6d4ee6ea0c5cfb0f698d8c0ed25638150f47.patch";
37       hash = "sha256-Q9+GM+mCEZK0QVp7ulH2hORVig2411OvkC4+o36DeXg=";
38     })
39     (fetchpatch {
40       name = "test-expired.patch";
41       url = "https://github.com/SAML-Toolkits/python3-saml/commit/feb0d1d954ee4d0ad1ad1d7d536bf9e83fa9431b.patch";
42       hash = "sha256-NURGI4FUnFlWRZfkioU9IYmZ+Zk9FKfZchjdn7N9abU=";
43     })
44   ];
46   propagatedBuildInputs = [
47     isodate
48     lxml
49     xmlsec
50   ];
52   nativeCheckInputs = [
53     freezegun
54   ];
56   pythonImportsCheck = [
57     "onelogin.saml2"
58   ];
60   meta = with lib; {
61     description = "OneLogin's SAML Python Toolkit";
62     homepage = "https://github.com/onelogin/python3-saml";
63     changelog = "https://github.com/SAML-Toolkits/python3-saml/blob/v${version}/changelog.md";
64     license = licenses.mit;
65     maintainers = with maintainers; [ zhaofengli ];
66   };