2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, fetchpatch
|
2023-01-11 07:51:40 +00:00
|
|
|
, freezegun
|
|
|
|
, isodate
|
|
|
|
, lxml
|
|
|
|
, pythonOlder
|
|
|
|
, xmlsec
|
|
|
|
}:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python3-saml";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.15.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "onelogin";
|
|
|
|
repo = "python3-saml";
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-xPPR2z3h8RpoAROpKpu9ZoDxGq5Stm9wQVt4Stj/6fg=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
patches = [
|
2023-11-16 04:20:00 +00:00
|
|
|
# skip tests with expired test data
|
|
|
|
# upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
|
2023-05-24 13:37:59 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "test-expired.patch";
|
|
|
|
url = "https://github.com/SAML-Toolkits/python3-saml/commit/bd65578e5a21494c89320094c61c1c77250bea33.diff";
|
|
|
|
hash = "sha256-9Trew6R5JDjtc0NRGoklqMVDEI4IEqFOdK3ezyBU6gI=";
|
|
|
|
})
|
2023-11-16 04:20:00 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "test-expired.patch";
|
|
|
|
url = "https://github.com/SAML-Toolkits/python3-saml/commit/ea3a6d4ee6ea0c5cfb0f698d8c0ed25638150f47.patch";
|
|
|
|
hash = "sha256-Q9+GM+mCEZK0QVp7ulH2hORVig2411OvkC4+o36DeXg=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "test-expired.patch";
|
|
|
|
url = "https://github.com/SAML-Toolkits/python3-saml/commit/feb0d1d954ee4d0ad1ad1d7d536bf9e83fa9431b.patch";
|
|
|
|
hash = "sha256-NURGI4FUnFlWRZfkioU9IYmZ+Zk9FKfZchjdn7N9abU=";
|
|
|
|
})
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
isodate
|
|
|
|
lxml
|
|
|
|
xmlsec
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
freezegun
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"onelogin.saml2"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
description = "OneLogin's SAML Python Toolkit";
|
2021-03-09 03:18:52 +00:00
|
|
|
homepage = "https://github.com/onelogin/python3-saml";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/SAML-Toolkits/python3-saml/blob/v${version}/changelog.md";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ zhaofengli ];
|
|
|
|
};
|
|
|
|
}
|