2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
freezegun,
|
|
|
|
isodate,
|
|
|
|
lxml,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
poetry-core,
|
|
|
|
xmlsec,
|
2023-01-11 07:51:40 +00:00
|
|
|
}:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python3-saml";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.16.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
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}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-KyDGmqhg/c29FaXPKK8rWKSBP6BOCpKKpOujCavXUcc=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build system, https://github.com/SAML-Toolkits/python3-saml/pull/341
|
|
|
|
(fetchpatch {
|
|
|
|
name = "switch-to-poetry-core.patch";
|
|
|
|
url = "https://github.com/SAML-Toolkits/python3-saml/commit/231a7e19543138fdd7424c01435dfe3f82bbe9ce.patch";
|
|
|
|
hash = "sha256-MvX1LXhf3LJUy3O7L0/ySyVY4KDGc/GKJud4pOkwVIk=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2024-01-25 14:12:00 +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
|
2024-01-25 14:12:00 +00:00
|
|
|
pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "onelogin.saml2" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require network acces or additions files
|
|
|
|
"OneLogin_Saml2_Metadata_Test"
|
|
|
|
"OneLogin_Saml2_Response_Test"
|
|
|
|
"OneLogin_Saml2_Utils_Test"
|
|
|
|
"OneLogin_Saml2_Settings_Test"
|
|
|
|
"OneLogin_Saml2_Auth_Test"
|
|
|
|
"OneLogin_Saml2_Authn_Request_Test"
|
|
|
|
"OneLogin_Saml2_IdPMetadataParser_Test"
|
|
|
|
"OneLogin_Saml2_Logout_Request_Test"
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|