2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, cryptography
|
|
|
|
, defusedxml
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, importlib-resources
|
2023-03-15 16:39:30 +00:00
|
|
|
, poetry-core
|
2021-12-06 16:07:01 +00:00
|
|
|
, pyasn1
|
|
|
|
, pymongo
|
|
|
|
, pyopenssl
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, responses
|
2022-06-16 17:23:12 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, substituteAll
|
2021-12-06 16:07:01 +00:00
|
|
|
, xmlschema
|
2020-04-24 23:36:52 +00:00
|
|
|
, xmlsec
|
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let
|
|
|
|
pymongo3 = pymongo.overridePythonAttrs(old: rec {
|
|
|
|
version = "3.12.3";
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "pymongo";
|
|
|
|
inherit version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-ConK3ABipeU2ZN3gQ/bAlxcrjBxfAJRJAJUoL/mZWl8=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
in buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pysaml2";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "7.4.1";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "IdentityPython";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-QHAbm6u5oH3O7MEVFE+sW98raquv89KJ8gonk3Yyu/0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
defusedxml
|
|
|
|
pyopenssl
|
2022-06-16 17:23:12 +00:00
|
|
|
python-dateutil
|
2021-12-06 16:07:01 +00:00
|
|
|
pytz
|
|
|
|
requests
|
2022-06-16 17:23:12 +00:00
|
|
|
setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
xmlschema
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pyasn1
|
2022-08-12 12:06:08 +00:00
|
|
|
pymongo3
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-xmlsec1-path.patch;
|
|
|
|
inherit xmlsec;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# fix failing tests on systems with 32bit time_t
|
|
|
|
sed -i 's/2999\(-.*T\)/2029\1/g' tests/*.xml
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Disabled tests try to access the network
|
|
|
|
"test_load_extern_incommon"
|
|
|
|
"test_load_remote_encoding"
|
|
|
|
"test_load_external"
|
|
|
|
"test_conf_syslog"
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"saml2"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python implementation of SAML Version 2 Standard";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/IdentityPython/pysaml2";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|